{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lebaneselegislation-com/json-schema/lebaneselegislation-com-issue-list-schema.json",
  "title": "IssueList",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lebaneselegislation-com-openapi.json#/components/schemas/IssueList",
  "type": "object",
  "required": [
    "since",
    "until",
    "order",
    "total",
    "issues"
  ],
  "properties": {
    "since": {
      "type": [
        "string",
        "null"
      ]
    },
    "until": {
      "type": [
        "string",
        "null"
      ]
    },
    "order": {
      "type": "string",
      "enum": [
        "newest",
        "oldest"
      ]
    },
    "total": {
      "type": "integer"
    },
    "next_cursor": {
      "type": "string",
      "description": "Pass it as cursor for the next page; absent on the last page."
    },
    "issues": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "text_count",
          "source",
          "url"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "number": {
            "type": "string"
          },
          "published_on": {
            "$ref": "#/$defs/Date"
          },
          "text_count": {
            "type": "integer"
          },
          "source": {
            "type": "string",
            "enum": [
              "centre",
              "scans"
            ],
            "description": "scans: an issue made for texts read from the Gazette's scanned pages."
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "updated_at": {
            "$ref": "#/$defs/UpdatedAt"
          }
        }
      }
    }
  },
  "$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."
    }
  }
}