{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "registryVersion": {
      "const": "1.0.0"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "enum": [
              "openapi",
              "sdk",
              "terraform-schema",
              "github-release",
              "api-dynamic",
              "manual",
              "rss",
              "status",
              "license",
              "mcp"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "fetchMethod": {
            "enum": [
              "http-get",
              "github-api",
              "local-command",
              "sdk-read",
              "disabled"
            ]
          },
          "trust": {
            "enum": [
              "primary-machine",
              "primary-human",
              "auxiliary"
            ]
          },
          "updateFrequency": {
            "type": "string",
            "minLength": 1
          },
          "lastFetchedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "hash": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^sha256:[0-9a-f]{64}$"
          },
          "verification": {
            "enum": [
              "verified",
              "needs-confirmation",
              "failed"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "schemaVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": "string"
          },
          "lastAttemptAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "httpStatus": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "url",
          "fetchMethod",
          "trust",
          "updateFrequency",
          "lastFetchedAt",
          "hash",
          "verification",
          "enabled",
          "schemaVersion",
          "notes",
          "lastAttemptAt",
          "httpStatus"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "registryVersion",
    "sources"
  ],
  "additionalProperties": false
}