{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fermyontechnologies/json-schema/fermyontechnologies-app-item-schema.json",
  "title": "AppItem",
  "x-generated": "2026-12-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fermyontechnologies-openapi.json#/components/schemas/AppItem",
  "required": [
    "channels",
    "created",
    "id",
    "lastModified",
    "name",
    "storageId",
    "subdomain"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "minLength": 1,
      "type": "string"
    },
    "storageId": {
      "minLength": 1,
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "subdomain": {
      "minLength": 1,
      "type": "string"
    },
    "healthStatus": {
      "$ref": "#/$defs/ApiHealthStatus"
    },
    "channels": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AppChannelListItem"
      }
    },
    "domain": {
      "$ref": "#/$defs/AppDomainItem"
    },
    "lastModified": {
      "type": "string",
      "format": "date-time"
    },
    "lastDeployed": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created": {
      "type": "string",
      "format": "date-time"
    },
    "latestRevision": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "additionalProperties": false,
  "$defs": {
    "ApiHealthStatus": {
      "enum": [
        "Healthy",
        "Unhealthy",
        "Degraded"
      ],
      "type": "string"
    },
    "AppChannelListItem": {
      "required": [
        "created",
        "id",
        "name"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "minLength": 1,
          "type": "string"
        },
        "activeRevisionNumber": {
          "type": "string"
        },
        "domain": {
          "type": "string"
        },
        "created": {
          "type": "string",
          "format": "date-time"
        },
        "healthStatus": {
          "$ref": "#/$defs/ApiHealthStatus"
        },
        "lastModified": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "AppDomainItem": {
      "required": [
        "name",
        "validationStatus"
      ],
      "type": "object",
      "properties": {
        "name": {
          "minLength": 1,
          "type": "string"
        },
        "validationStatus": {
          "$ref": "#/$defs/ValidationStatus"
        },
        "lastModified": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "ValidationStatus": {
      "enum": [
        "InProgress",
        "Error",
        "Ready",
        "Provisioning"
      ],
      "type": "string"
    }
  }
}