{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openric.org/schemas/autocomplete.schema.json",
  "title": "OpenRiC autocomplete response",
  "description": "Response shape for GET /api/ric/v1/autocomplete?q=&types=&limit=. A flat array of entity hits across all requested types.",
  "type": "array",
  "maxItems": 200,
  "items": {
    "type": "object",
    "required": ["id", "label", "type"],
    "properties": {
      "id": {
        "type": ["string", "integer"],
        "description": "Stable identifier for the entity — either a numeric id or a canonical URI. Caller passes this back as ?uri= to /graph or to entity-specific endpoints."
      },
      "label": {
        "type": "string",
        "description": "Human-readable display label in the requested culture."
      },
      "type": {
        "type": "string",
        "description": "Short entity class — Place, Rule, Activity, Instantiation, Agent, Record, Repository, DigitalObject, Thing."
      },
      "slug": { "type": ["string", "null"] },
      "culture": { "type": ["string", "null"] }
    },
    "additionalProperties": true
  }
}
