{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lebaneselegislation-com/json-schema/lebaneselegislation-com-ruling-detail-schema.json",
  "title": "RulingDetail",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lebaneselegislation-com-openapi.json#/components/schemas/RulingDetail",
  "type": "object",
  "required": [
    "id",
    "title",
    "url",
    "not_legal_advice"
  ],
  "properties": {
    "id": {
      "type": "integer"
    },
    "court": {
      "type": "string"
    },
    "court_en": {
      "type": "string"
    },
    "number": {
      "type": "string"
    },
    "year": {
      "type": "integer"
    },
    "decided_on": {
      "$ref": "#/$defs/Date"
    },
    "title": {
      "type": "string"
    },
    "president": {
      "type": "string"
    },
    "members": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "text_ar": {
      "type": "string"
    },
    "note": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "source_url": {
      "type": "string",
      "format": "uri"
    },
    "pages_model": {
      "type": "string"
    },
    "pdf_url": {
      "type": "string",
      "format": "uri",
      "description": "The judgment's scan on the Lebanese University's site: the reference."
    },
    "page_count": {
      "type": "integer"
    },
    "pages": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "n",
          "text_ar"
        ],
        "properties": {
          "n": {
            "type": "integer"
          },
          "text_ar": {
            "type": "string"
          },
          "low_confidence": {
            "type": "boolean"
          }
        }
      }
    },
    "pages_note": {
      "type": "string"
    },
    "updated_at": {
      "$ref": "#/$defs/UpdatedAt"
    },
    "not_legal_advice": {
      "type": "string"
    }
  },
  "$defs": {
    "Date": {
      "type": "string",
      "format": "date"
    },
    "UpdatedAt": {
      "type": "string",
      "format": "date",
      "description": "The day the record's page last changed on the site (page_state): an amendment in force, a ruling's reading, a correction. Never the text's own date. Absent when not known."
    }
  }
}