{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sournd.com/catalog.schema.json",
  "title": "sournd engine catalogue",
  "type": "object",
  "required": ["abi_version", "engines"],
  "properties": {
    "abi_version": {"type": "integer", "description": "C ABI version these engines are built for."},
    "juce_module": {"type": "string"},
    "docs": {"type": "object", "additionalProperties": {"type": "string", "format": "uri"}},
    "categories": {"type": "object"},
    "engines": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "name", "kind", "category", "tier", "version", "description", "params", "latency", "tail_seconds", "url"],
        "properties": {
          "id": {"type": "string", "description": "Engine id passed to sournd_engine_create and SourndEngine."},
          "name": {"type": "string"},
          "kind": {"type": "string"},
          "category": {"type": "string"},
          "tier": {"enum": ["free", "paid"]},
          "download": {"type": "object", "description": "Free engines only: direct downloads with no account (macos, linux), one archive with every free engine.", "additionalProperties": {"type": "string", "format": "uri"}},
          "version": {"type": "string"},
          "description": {"type": "string"},
          "provenance": {"type": "string", "description": "How the engine was designed."},
          "styles": {"type": "array", "items": {"type": "string"}},
          "latency": {"type": "integer", "description": "Samples."},
          "tail_seconds": {"type": "number"},
          "sidechain": {"type": "boolean"},
          "url": {"type": "string", "format": "uri"},
          "markdown_url": {"type": "string", "format": "uri"},
          "params": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["abi_id", "key", "name", "min", "max", "default", "unit", "taper"],
              "properties": {
                "abi_id": {"type": "integer", "description": "C ABI parameter id and JUCE parameter id (as a decimal string)."},
                "key": {"type": "string"},
                "name": {"type": "string"},
                "min": {"type": "number"},
                "max": {"type": "number"},
                "default": {"type": "number"},
                "unit": {"type": "string"},
                "taper": {"type": "string"}
              }
            }
          },
          "readouts": {"type": "array"}
        }
      }
    }
  }
}
