{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api-evangelist.github.io/red-hat-3scale/json-schema/red-hat-3scale-application-schema.json",
  "title": "Red Hat 3scale Application",
  "description": "Schema for an application in Red Hat 3scale API Management. Applications hold API credentials and are subscribed to application plans.",
  "type": "object",
  "required": ["id", "state", "name"],
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique application identifier"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Application creation timestamp"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Application last updated timestamp"
    },
    "state": {
      "type": "string",
      "enum": ["live", "suspended"],
      "description": "Application state"
    },
    "user_account_id": {
      "type": "integer",
      "description": "ID of the developer account that owns this application"
    },
    "name": {
      "type": "string",
      "description": "Application display name",
      "minLength": 1
    },
    "description": {
      "type": "string",
      "description": "Application description"
    },
    "user_key": {
      "type": "string",
      "description": "API key credential for API key authentication mode"
    },
    "plan": {
      "type": "object",
      "description": "The application plan this application is subscribed to",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "system_name": {
          "type": "string"
        }
      }
    }
  }
}
