{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://stella-create.co.jp/tools/catalog.schema.json",
  "title": "Stella Create Frontend Tools discovery catalog (site-specific format)",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "schemaVersion",
    "name",
    "language",
    "url",
    "scope",
    "toolCount",
    "categories",
    "tools"
  ],
  "properties": {
    "$schema": {
      "const": "https://stella-create.co.jp/tools/catalog.schema.json"
    },
    "schemaVersion": {
      "const": 1
    },
    "name": {
      "const": "Frontend Tools"
    },
    "language": {
      "const": "ja"
    },
    "url": {
      "const": "https://stella-create.co.jp/tools/"
    },
    "scope": {
      "type": "string",
      "minLength": 1
    },
    "toolCount": {
      "type": "integer",
      "minimum": 1
    },
    "categories": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "generator",
              "motion",
              "layout",
              "state",
              "color",
              "experiment"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "tools": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "description",
          "url",
          "category",
          "tags",
          "keywords"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9-]+$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://stella-create\\.co\\.jp/tools/[a-z0-9-]+/$"
          },
          "category": {
            "type": "string",
            "enum": [
              "generator",
              "motion",
              "layout",
              "state",
              "color",
              "experiment"
            ]
          },
          "tags": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "keywords": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    }
  }
}
