{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/evidujzdarma-cz/json-schema/evidujzdarma-cz-units-schema.json",
  "title": "Units",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/evidujzdarma-cz-units-api-openapi.yml#/components/schemas/Units",
  "type": "object",
  "properties": {
    "units": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "fsUnitId": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          },
          "ready": {
            "type": "boolean"
          },
          "notReadyReason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "unit_missing_fs_id",
                  "certificate_missing",
                  "certificate_expired",
                  "account_closed"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "label",
          "type",
          "fsUnitId",
          "active",
          "ready",
          "notReadyReason"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "units"
  ],
  "additionalProperties": false
}