{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://abdess.github.io/retrobios/api/v1/schemas/registry.schema.json",
  "title": "RetroBIOS platform registry",
  "description": "platforms/_registry.yml: each registered platform and whether a release publishes a ZIP pack for it. Install detection and the other per-platform fields are read by their own tools.",
  "type": "object",
  "required": ["platforms"],
  "properties": {
    "platforms": {
      "type": "object",
      "minProperties": 1,
      "propertyNames": { "pattern": "^[a-z0-9_]+$" },
      "additionalProperties": {
        "type": "object",
        "required": ["config"],
        "properties": {
          "config": { "type": "string", "pattern": "\\.yml$" },
          "release_pack": {
            "description": "true when a release publishes the platform's full ZIP pack. Absent or false: the installer serves the platform, its manifest is written all the same.",
            "type": "boolean"
          },
          "device_group": { "type": "string" },
          "extract_to": { "type": ["string", "null"] }
        }
      }
    }
  }
}
