{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://get-design-done.example/schemas/marketplace.schema.json",
  "title": "Claude marketplace.json",
  "description": "Shape of .claude-plugin/marketplace.json — the plugin marketplace descriptor.",
  "type": "object",
  "additionalProperties": true,
  "required": ["name", "owner", "metadata", "plugins"],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "owner": {
      "type": "object",
      "additionalProperties": true,
      "required": ["name"],
      "properties": {
        "name": { "type": "string", "minLength": 1 }
      }
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true,
      "required": ["description", "version"],
      "properties": {
        "description": { "type": "string", "minLength": 1 },
        "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(\\.\\d+)?$" }
      }
    },
    "plugins": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "name",
          "source",
          "description",
          "version",
          "author",
          "repository",
          "license",
          "category",
          "keywords"
        ],
        "properties": {
          "name": { "type": "string", "minLength": 1 },
          "source": { "type": "string", "minLength": 1 },
          "description": { "type": "string", "minLength": 1 },
          "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(\\.\\d+)?$" },
          "author": {
            "type": "object",
            "additionalProperties": true,
            "required": ["name"],
            "properties": {
              "name": { "type": "string", "minLength": 1 }
            }
          },
          "homepage": { "type": "string" },
          "repository": { "type": "string" },
          "license": { "type": "string" },
          "category": { "type": "string" },
          "keywords": {
            "type": "array",
            "items": { "type": "string" }
          }
        }
      }
    }
  }
}
