{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lexbase-pt/json-schema/lexbase-pt-search-response-schema.json",
  "title": "SearchResponse",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lexbase-pt-openapi.json#/components/schemas/SearchResponse",
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "total": {
      "type": "integer"
    },
    "note": {
      "type": "string",
      "description": "Present when total=0 — why nothing matched."
    },
    "hits": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fragment_id": {
            "type": "string"
          },
          "citation": {
            "type": "string",
            "description": "Verifiable citation: diploma + article."
          },
          "texto": {
            "type": "string"
          },
          "in_force": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "description": "Permalink into lexbase.pt with the article highlighted."
          }
        }
      }
    }
  }
}