{
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "ManagementContext represents the configuration for a specific environment",
      "properties": {
        "auth": {
          "description": "Auth defines the authentication method used to connect to the API Management.",
          "properties": {
            "bearerToken": {
              "description": "The bearer token used to authenticate against the API Management instance\n(must be generated from...",
              "type": "string"
            },
            "credentials": {
              "description": "The Basic credentials used to authenticate against the API Management instance.",
              "properties": {
                "password": {
                  "type": "string"
                },
                "username": {
                  "type": "string"
                }
              },
              "required": [
                "password",
                "username"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "secretRef": {
              "description": "A secret reference holding either a \"bearerToken\" key for bearer token authentication\nor \"username\"...",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "namespace": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ],
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "baseUrl": {
          "description": "The URL of a management API instance.",
          "type": "string"
        },
        "cloud": {
          "description": "Cloud when set (token or secretRef) this context will target Gravitee Cloud.",
          "properties": {
            "secretRef": {
              "description": "SecretRef secret reference holding the Gravitee cloud token in the \"cloudToken\" key",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "namespace": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "token": {
              "description": "Token plain text Gravitee cloud token (JWT)",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "environmentId": {
          "description": "An existing environment id targeted by the context within the organization.",
          "type": "string"
        },
        "organizationId": {
          "description": "An existing organization id targeted by the context on the management API instance.",
          "type": "string"
        },
        "path": {
          "description": "Allows to override the context path that will be appended to the baseURL.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "ManagementContextStatus defines the observed state of an API Context.",
      "properties": {
        "conditions": {
          "default": [],
          "description": "Conditions describe the current conditions of the ManagementContext.",
          "items": {
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.",
                "format": "int64",
                "minimum": 0,
                "type": "integer"
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "maxItems": 8,
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
