Deployment .yaml File Structure (apply command)

The revision field must have the value last or contain only numeric characters ("1", "2", …​). The value must be >= 1 and cannot start with zero (schema rule).

apiVersion: api-management.sensedia.com/v1
kind: Deployment
metadata:
  # Open text description with only example values
  type: production
  owner: engineering
spec:
  # Identifying fields
  apiRef:
     name: "Open Banking API"
     version: "1.0.0"
  environmentRef:
     name: "Production"
  # Other fields
  revision: "last"

Deployment Schema (apply command)

{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "$id": "https://sensedia.com/cli/api-management/deployment/apply",
  "type": "object",
  "properties": {
    "apiVersion": {
      "type": "string",
      "enum": [
        "api-management.sensedia.com/v1"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "Deployment"
      ]
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "spec": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "apiRef",
        "environmentRef"
      ],
      "properties": {
        "apiRef": {
          "$ref": "#/$defs/apiRef"
        },
        "environmentRef": {
          "$ref": "#/$defs/namedRef"
        },
        "revision": {
          "type": "string",
          "default": "last",
          "pattern": "^(last|[1-9][0-9]*)$"
        }
      }
    }
  },
  "required": [
    "apiVersion",
    "kind",
    "spec"
  ],
  "$defs": {
    "namedRef": {
      "additionalProperties": false,
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    },
    "apiRef": {
      "additionalProperties": false,
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "version"
      ]
    }
  }
}
Thanks for your feedback!
EDIT

Share your suggestions with us!
Click here and then [+ Submit idea]