{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lettance-com/json-schema/lettance-com-rule-list-response-schema.json",
  "title": "RuleListResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lettance-com-openapi.json#/components/schemas/RuleListResponse",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/RuleList"
    },
    "meta": {
      "$ref": "#/$defs/Meta"
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "$defs": {
    "Meta": {
      "type": "object",
      "properties": {
        "sources": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "Absolute URL"
          },
          "description": "Distinct upstream sources this response draws on: legislation, GOV.UK guidance, council pages and data services."
        },
        "coverage": {
          "type": "string",
          "description": "How much of England the council licensing research covers today."
        },
        "notice": {
          "type": "string",
          "description": "How to use this answer. It is information, not legal advice."
        },
        "catalogueDate": {
          "type": "string",
          "description": "The catalogue edition this response was built from."
        },
        "links": {
          "type": "object",
          "properties": {
            "documentation": {
              "type": "string",
              "description": "Absolute URL"
            },
            "openapi": {
              "type": "string",
              "description": "Absolute URL"
            },
            "html": {
              "description": "The human page for this answer.",
              "type": "string"
            },
            "markdown": {
              "description": "The same page as Markdown, for agents.",
              "type": "string"
            }
          },
          "required": [
            "documentation",
            "openapi"
          ]
        }
      },
      "required": [
        "sources",
        "coverage",
        "notice",
        "catalogueDate",
        "links"
      ],
      "description": "Sources, coverage and links. Present on every response, including errors."
    },
    "RuleList": {
      "type": "object",
      "properties": {
        "query": {
          "description": "The search words, or null when listing every rule.",
          "type": [
            "string",
            "null"
          ]
        },
        "total": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "rules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RuleSummary"
          }
        }
      },
      "required": [
        "query",
        "total",
        "rules"
      ]
    },
    "RuleSummary": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "in_force",
            "confirmed_future",
            "proposed"
          ],
          "description": "proposed is not law yet; confirmed_future has a set start date."
        },
        "summary": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "description": "Absolute URL"
        }
      },
      "required": [
        "id",
        "title",
        "status",
        "summary",
        "url"
      ]
    }
  }
}