{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/casedaleel-com/json-schema/casedaleel-com-faq-search-result-schema.json",
  "title": "FaqSearchResult",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/casedaleel-com-openapi.yml#/components/schemas/FaqSearchResult",
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "language": {
      "type": "string",
      "enum": [
        "en",
        "ar"
      ]
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FaqEntry"
      }
    },
    "source_url": {
      "type": "string",
      "format": "uri",
      "description": "Canonical page to cite."
    },
    "disclaimer": {
      "type": "string",
      "description": "Always \"General information, not legal advice. CaseDaleel is not a law firm.\" (Arabic results append an Arabic translation)."
    }
  },
  "required": [
    "results",
    "source_url",
    "disclaimer"
  ],
  "$defs": {
    "FaqEntry": {
      "type": "object",
      "properties": {
        "question": {
          "type": "string"
        },
        "answer": {
          "type": "string"
        },
        "topic": {
          "type": "string"
        },
        "topic_id": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Canonical FAQ section to cite."
        },
        "official_source": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "url": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "related_guides": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        },
        "relevance": {
          "type": "number"
        }
      },
      "required": [
        "question",
        "answer",
        "url"
      ]
    }
  }
}