{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adadiamonds-com/json-schema/adadiamonds-com-api-index-schema.json",
  "title": "ApiIndex",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adadiamonds-com-discovery-api-openapi.yml#/components/schemas/ApiIndex",
  "type": "object",
  "required": [
    "object",
    "version",
    "endpoints",
    "documentation_url",
    "openapi_url",
    "mcp_url"
  ],
  "properties": {
    "object": {
      "type": "string",
      "const": "api_index"
    },
    "name": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "base_url": {
      "type": "string",
      "format": "uri"
    },
    "credential": {
      "$ref": "#/$defs/Credential"
    },
    "documentation_url": {
      "type": "string",
      "format": "uri"
    },
    "openapi_url": {
      "type": "string",
      "format": "uri"
    },
    "mcp_url": {
      "type": "string",
      "format": "uri"
    },
    "llms_txt_url": {
      "type": "string",
      "format": "uri"
    },
    "endpoints": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ApiIndexEndpoint"
      }
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "ApiIndexEndpoint": {
      "type": "object",
      "required": [
        "method",
        "path",
        "operationId",
        "auth"
      ],
      "properties": {
        "method": {
          "type": "string"
        },
        "path": {
          "type": "string",
          "format": "uri"
        },
        "operationId": {
          "type": "string"
        },
        "auth": {
          "type": "string",
          "description": "\"none\" or the required OAuth scope."
        }
      }
    },
    "Credential": {
      "type": "object",
      "required": [
        "kind",
        "env",
        "scopes"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "anonymous",
            "api_key",
            "access_token"
          ]
        },
        "env": {
          "type": "string",
          "enum": [
            "production",
            "sandbox"
          ]
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "catalog:read",
              "content:read",
              "profile:read",
              "orders:read",
              "cart:write",
              "appointments:write"
            ]
          }
        }
      }
    }
  }
}