{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thebureauoflostcontext-agency/json-schema/thebureauoflostcontext-agency-legacy-discovery-schema.json",
  "title": "LegacyDiscovery",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thebureauoflostcontext-agency-openapi.json#/components/schemas/LegacyDiscovery",
  "type": "object",
  "required": [
    "schema",
    "name",
    "origin",
    "interfaces",
    "first_useful_action",
    "capabilities",
    "identity",
    "limitations"
  ],
  "properties": {
    "schema": {
      "type": "string",
      "const": "bureau.discovery.v1"
    },
    "name": {
      "type": "string"
    },
    "origin": {
      "type": "string",
      "format": "uri"
    },
    "description": {
      "type": "string"
    },
    "interfaces": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "first_useful_action": {
      "type": "object",
      "required": [
        "method",
        "path",
        "purpose"
      ],
      "properties": {
        "method": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "purpose": {
          "type": "string"
        },
        "follow_up": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "capabilities": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LegacyCapability"
      }
    },
    "identity": {
      "type": "object",
      "additionalProperties": true
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "LegacyCapability": {
      "type": "object",
      "required": [
        "id",
        "state"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "state": {
          "type": "string",
          "enum": [
            "available",
            "disabled",
            "planned"
          ]
        },
        "method": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "contract": {
          "type": "string"
        }
      }
    }
  }
}