{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lettance-com/json-schema/lettance-com-council-list-response-schema.json",
  "title": "CouncilListResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lettance-com-openapi.json#/components/schemas/CouncilListResponse",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/CouncilList"
    },
    "meta": {
      "$ref": "#/$defs/Meta"
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "$defs": {
    "CouncilList": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "researched": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "councils": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CouncilListing"
          }
        }
      },
      "required": [
        "total",
        "researched",
        "councils"
      ]
    },
    "CouncilListing": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "gss": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "researched": {
          "type": "boolean"
        },
        "researchedAt": {
          "anyOf": [
            {
              "type": "string",
              "description": "ISO date, YYYY-MM-DD"
            },
            {
              "type": "null"
            }
          ]
        },
        "verifiedAt": {
          "anyOf": [
            {
              "type": "string",
              "description": "ISO date, YYYY-MM-DD"
            },
            {
              "type": "null"
            }
          ]
        },
        "schemeCount": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "openQuestionCount": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "url": {
          "anyOf": [
            {
              "type": "string",
              "description": "Absolute URL"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "name",
        "slug",
        "gss",
        "region",
        "researched",
        "researchedAt",
        "verifiedAt",
        "schemeCount",
        "openQuestionCount",
        "url"
      ]
    },
    "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."
    }
  }
}