{
  "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": "Application is the main resource handled by the Kubernetes Operator",
      "properties": {
        "background": {
          "description": "The base64 encoded background to use for this application when displaying it on the portal",
          "type": "string"
        },
        "contextRef": {
          "properties": {
            "kind": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "description": {
          "description": "Application Description",
          "type": "string"
        },
        "domain": {
          "description": "Application domain",
          "type": "string"
        },
        "groups": {
          "description": "Application groups",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "id": {
          "description": "io.gravitee.definition.model.Application\nApplication ID",
          "type": "string"
        },
        "members": {
          "description": "Application members",
          "items": {
            "properties": {
              "role": {
                "default": "USER",
                "description": "The API role associated with this Member",
                "type": "string"
              },
              "source": {
                "description": "Member source",
                "example": "gravitee",
                "type": "string"
              },
              "sourceId": {
                "description": "Member source ID",
                "example": "user@email.com",
                "type": "string"
              }
            },
            "required": [
              "source",
              "sourceId"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "metadata": {
          "description": "Application metadata",
          "items": {
            "properties": {
              "defaultValue": {
                "description": "Metadata DefaultValue",
                "type": "string"
              },
              "format": {
                "description": "Metadata Format",
                "enum": [
                  "STRING",
                  "NUMERIC",
                  "BOOLEAN",
                  "DATE",
                  "MAIL",
                  "URL"
                ],
                "type": "string"
              },
              "hidden": {
                "description": "Metadata is hidden or not?",
                "type": "boolean"
              },
              "name": {
                "description": "Metadata Name",
                "type": "string"
              },
              "value": {
                "description": "Metadata Value",
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "name": {
          "description": "Application name",
          "type": "string"
        },
        "notifyMembers": {
          "description": "Notify members when they are added to the application",
          "type": "boolean"
        },
        "picture": {
          "description": "The base64 encoded picture to use for this application when displaying it on the portal (if not...",
          "type": "string"
        },
        "pictureUrl": {
          "description": "A URL pointing to the picture to use when displaying the application on the portal",
          "type": "string"
        },
        "settings": {
          "description": "Application settings",
          "properties": {
            "app": {
              "properties": {
                "clientId": {
                  "description": "ClientID is the client id of the application",
                  "type": "string"
                },
                "type": {
                  "description": "Application Type",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "oauth": {
              "properties": {
                "applicationType": {
                  "description": "Oauth client application type",
                  "enum": [
                    "BACKEND_TO_BACKEND",
                    "NATIVE",
                    "BROWSER",
                    "WEB"
                  ],
                  "type": "string"
                },
                "grantTypes": {
                  "description": "List of Oauth client grant types",
                  "items": {
                    "enum": [
                      "authorization_code",
                      "client_credentials",
                      "refresh_token",
                      "password",
                      "implicit"
                    ],
                    "type": "string"
                  },
                  "type": "array"
                },
                "redirectUris": {
                  "description": "List of Oauth client redirect uris",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "required": [
                "applicationType",
                "grantTypes"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "tls": {
              "description": "TLS settings are used to configure client side TLS in order\nto be able to subscribe to a MTLS plan.",
              "properties": {
                "clientCertificate": {
                  "description": "This client certificate is mandatory to subscribe to a TLS plan.",
                  "type": "string"
                }
              },
              "required": [
                "clientCertificate"
              ],
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "contextRef",
        "description",
        "name",
        "settings"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "ApplicationStatus defines the observed state of Application.",
      "properties": {
        "conditions": {
          "default": [],
          "description": "Conditions describe the current conditions of the Application.",
          "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"
        },
        "environmentId": {
          "description": "The environment ID, if a management context has been defined to sync with an APIM instance",
          "type": "string"
        },
        "errors": {
          "description": "When application has been created regardless of errors, this field is\nused to persist the error...",
          "properties": {
            "severe": {
              "description": "severe errors do not pass admission and will block reconcile\nhence, this field should always be...",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "warning": {
              "description": "warning errors do not block object reconciliation,\nmost of the time because the value is ignored or...",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "id": {
          "description": "The ID of the Application, if a management context has been defined to sync with an APIM instance",
          "type": "string"
        },
        "organizationId": {
          "description": "The organization ID, if a management context has been defined to sync with an APIM instance",
          "type": "string"
        },
        "processingStatus": {
          "description": "The processing status of the Application.",
          "type": "string"
        },
        "subscriptions": {
          "description": "The number of subscriptions that reference the application",
          "type": "integer"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
