{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/damdafa-com/json-schema/damdafa-com-device-catalog-schema.json",
  "title": "DeviceCatalog",
  "description": "The full device catalog structure.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/damdafa-com-catalog-api-openapi.yml#/components/schemas/DeviceCatalog",
  "properties": {
    "version": {
      "type": "string",
      "title": "Version"
    },
    "platforms": {
      "additionalProperties": {
        "$ref": "#/$defs/DevicePlatform"
      },
      "propertyNames": {
        "$ref": "#/$defs/DeviceCatalogPlatformId"
      },
      "type": "object",
      "title": "Platforms"
    }
  },
  "type": "object",
  "required": [
    "version",
    "platforms"
  ],
  "$defs": {
    "DeviceCatalogPlatformId": {
      "type": "string",
      "enum": [
        "iphone",
        "ipad",
        "androidPhone",
        "androidTablet"
      ],
      "title": "DeviceCatalogPlatformId",
      "description": "Exact platform keys used in `apps/mockupper/data/device_catalog.json`."
    },
    "DeviceColor": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "frameUrl": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Frameurl"
        },
        "frameUrlSvg": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Frameurlsvg"
        },
        "frameUrlWebp": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Frameurlwebp"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "title": "DeviceColor",
      "description": "Represents a specific color variant of a device model."
    },
    "DeviceModel": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "width": {
          "type": "integer",
          "title": "Width"
        },
        "height": {
          "type": "integer",
          "title": "Height"
        },
        "screenSize": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Screensize"
        },
        "colors": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/DeviceColor"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Colors"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "width",
        "height"
      ],
      "title": "DeviceModel",
      "description": "Represents a specific device model (e.g., iPhone 14 Pro Max)."
    },
    "DevicePlatform": {
      "properties": {
        "label": {
          "type": "string",
          "title": "Label"
        },
        "models": {
          "items": {
            "$ref": "#/$defs/DeviceModel"
          },
          "type": "array",
          "title": "Models"
        },
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Width"
        },
        "height": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Height"
        }
      },
      "type": "object",
      "required": [
        "label",
        "models"
      ],
      "title": "DevicePlatform",
      "description": "Represents a platform category (e.g., iPhone, Android Phone)."
    }
  }
}