{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/artificialwatch/json-schema/artificialwatch-retirements-schema.json",
  "title": "Retirements",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/artificialwatch-openapi.json#/components/schemas/Retirements",
  "type": "object",
  "required": [
    "name",
    "url",
    "license",
    "generated",
    "sources",
    "count",
    "scheduled",
    "retirements"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "license": {
      "type": "string",
      "format": "uri"
    },
    "attribution": {
      "type": "string"
    },
    "method": {
      "type": "string"
    },
    "generated": {
      "type": "string",
      "format": "date"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "lab",
          "url"
        ],
        "properties": {
          "lab": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "checked": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "count": {
      "type": "integer"
    },
    "scheduled": {
      "type": "integer"
    },
    "retirements": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Retirement"
      }
    }
  },
  "$defs": {
    "Retirement": {
      "type": "object",
      "required": [
        "lab",
        "model",
        "ids",
        "shutdown",
        "earliest",
        "status",
        "replacement",
        "note",
        "source"
      ],
      "properties": {
        "lab": {
          "type": "string"
        },
        "model": {
          "type": "string",
          "description": "The model (or endpoint) as the lab's page names it"
        },
        "ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "API ids the row covers, dated snapshots included"
        },
        "shutdown": {
          "type": "string",
          "format": "date"
        },
        "earliest": {
          "type": "boolean",
          "description": "The lab gives this as the earliest possible date, not a fixed one"
        },
        "status": {
          "type": "string",
          "enum": [
            "scheduled",
            "retired"
          ]
        },
        "replacement": {
          "type": [
            "string",
            "null"
          ],
          "description": "The lab's recommended replacement"
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": "string",
          "format": "uri",
          "description": "The lab's deprecation page"
        }
      }
    }
  }
}