{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://super-calendar.io/agents/endpoint-registry.schema.json",
  "title": "Super Calendar Endpoint Registry",
  "type": "object",
  "required": ["schema", "generated_from", "endpoints"],
  "properties": {
    "$schema": { "type": "string" },
    "schema": { "const": "super-calendar.endpoint-registry.v1" },
    "generated_from": {
      "type": "object",
      "additionalProperties": { "type": "string", "pattern": "^/" }
    },
    "endpoints": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "lifecycle", "preferred_surface", "http", "contracts"],
        "properties": {
          "id": { "type": "string" },
          "lifecycle": { "type": "string" },
          "preferred_surface": { "type": "string" },
          "http": {
            "type": "object",
            "required": ["method", "path", "parameters", "formats"],
            "properties": {
              "method": { "const": "GET" },
              "path": { "type": "string", "pattern": "^/api/" },
              "operation_id": { "type": "string" },
              "summary": { "type": "string" },
              "parameters": { "type": "array" },
              "formats": { "type": "array", "items": { "type": "string" } }
            },
            "additionalProperties": false
          },
          "io": { "type": ["object", "null"] },
          "contracts": { "type": "object" }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
