{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/preuve-ai/json-schema/preuve-ai-api-discovery-schema.json",
  "title": "ApiDiscovery",
  "description": "The unauthenticated GET /api/agent document.",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/preuve-ai-openapi.json#/components/schemas/ApiDiscovery",
  "type": "object",
  "required": [
    "name",
    "version",
    "baseUrl",
    "openapi",
    "authentication",
    "endpoints"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "baseUrl": {
      "type": "string",
      "format": "uri"
    },
    "openapi": {
      "type": "object",
      "properties": {
        "json": {
          "type": "string",
          "format": "uri"
        },
        "yaml": {
          "type": "string",
          "format": "uri"
        },
        "json30": {
          "type": "string",
          "format": "uri",
          "description": "The same spec as OpenAPI 3.0.3, for importers that reject 3.1."
        }
      }
    },
    "apiCatalog": {
      "type": "string",
      "format": "uri",
      "description": "RFC 9727 api-catalog Linkset."
    },
    "docs": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "format": "uri"
      }
    },
    "authentication": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "http"
          ]
        },
        "scheme": {
          "type": "string",
          "enum": [
            "bearer"
          ]
        },
        "header": {
          "type": "string"
        },
        "format": {
          "type": "string"
        },
        "keyPrefix": {
          "type": "string"
        },
        "selfServe": {
          "type": "string",
          "format": "uri"
        },
        "oauth": {
          "type": "string",
          "format": "uri"
        },
        "note": {
          "type": "string"
        }
      }
    },
    "pricing": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "rateLimits": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "errors": {
      "type": "object",
      "additionalProperties": true
    },
    "endpoints": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "method",
          "path",
          "operationId"
        ],
        "properties": {
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "operationId": {
            "type": "string"
          }
        }
      }
    },
    "mcp": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  }
}