{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/casedaleel-com/json-schema/casedaleel-com-guide-schema.json",
  "title": "Guide",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/casedaleel-com-openapi.yml#/components/schemas/Guide",
  "allOf": [
    {
      "$ref": "#/$defs/GuideSummary"
    },
    {
      "type": "object",
      "properties": {
        "body_markdown": {
          "type": "string"
        },
        "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": [
        "body_markdown",
        "source_url",
        "disclaimer"
      ]
    }
  ],
  "$defs": {
    "GuideSummary": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "guide",
            "composite-case-study"
          ],
          "description": "composite-case-study = fictional learning example, not a real client or outcome."
        },
        "language": {
          "type": "string",
          "enum": [
            "en",
            "ar"
          ]
        },
        "title": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "date_published": {
          "type": [
            "string",
            "null"
          ]
        },
        "date_modified": {
          "type": [
            "string",
            "null"
          ]
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "slug",
        "kind",
        "title",
        "summary",
        "url"
      ]
    }
  }
}