{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/xiaojiou176-open/Switchyard/docs/compat-target-catalog.schema.json",
  "title": "Switchyard Compat Target Catalog",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "catalogVersion",
    "targets"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "catalogVersion": {
      "type": "integer",
      "minimum": 1
    },
    "targets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/target"
      }
    }
  },
  "$defs": {
    "status": {
      "type": "string",
      "enum": [
        "partial",
        "planned",
        "research only"
      ]
    },
    "target": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "target",
        "status",
        "builderFacing",
        "failClosed",
        "transport",
        "route",
        "supportedModes",
        "truthfulMeaning",
        "notYetSupported",
        "notes",
        "sourceAnchors"
      ],
      "properties": {
        "target": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "$ref": "#/$defs/status"
        },
        "builderFacing": {
          "type": "boolean"
        },
        "failClosed": {
          "type": "boolean"
        },
        "transport": {
          "type": "string",
          "minLength": 1
        },
        "route": {
          "type": "string",
          "minLength": 1
        },
        "supportedModes": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "truthfulMeaning": {
          "type": "string",
          "minLength": 1
        },
        "notYetSupported": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "notes": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "sourceAnchors": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    }
  }
}
