{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/manchestertonight-co-uk/json-schema/manchestertonight-co-uk-listing-schema.json",
  "title": "Listing",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/manchestertonight-co-uk-openapi.json#/components/schemas/Listing",
  "type": "object",
  "required": [
    "id",
    "venue",
    "venue_url",
    "area",
    "type",
    "type_label",
    "days",
    "day_rule",
    "time",
    "last_checked"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "venue": {
      "type": "string"
    },
    "venue_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Link to cite when recommending this night. Null for a one-off at a venue with no page here: cite source_url instead."
    },
    "event_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Show or quiz name, if it has one."
    },
    "area": {
      "type": "string",
      "description": "Neighbourhood, e.g. \"Northern Quarter\"."
    },
    "area_group": {
      "type": "string",
      "description": "Area slug, e.g. \"city-centre\", or \"further-out\"."
    },
    "type": {
      "type": "string",
      "description": "Type slug, e.g. \"pub-quizzes\"."
    },
    "type_label": {
      "type": "string"
    },
    "days": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Sunday",
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday",
          "Saturday"
        ]
      }
    },
    "day_rule": {
      "type": "string",
      "description": "e.g. \"Every Tuesday\" or \"1st Thursday of the month\"."
    },
    "weeks_of_month": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "integer"
      },
      "description": "[1] = first of the month, [-1] = last; null = every week."
    },
    "fortnightly": {
      "type": "boolean"
    },
    "start_time": {
      "type": [
        "string",
        "null"
      ],
      "description": "24-hour \"HH:MM\", UK time."
    },
    "end_time": {
      "type": [
        "string",
        "null"
      ],
      "description": "24-hour \"HH:MM\", UK time."
    },
    "time": {
      "type": "string",
      "description": "Human-readable time, e.g. \"8pm till 10pm\"."
    },
    "time_note": {
      "type": [
        "string",
        "null"
      ]
    },
    "note": {
      "type": [
        "string",
        "null"
      ]
    },
    "address": {
      "type": [
        "string",
        "null"
      ]
    },
    "source_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Where the listing was checked."
    },
    "last_checked": {
      "type": "string",
      "format": "date"
    },
    "sponsored": {
      "type": "boolean",
      "description": "True for paid placements."
    },
    "on_date": {
      "type": [
        "string",
        "null"
      ],
      "description": "YYYY-MM-DD for one-off events; null for regular nights."
    },
    "on_date_end": {
      "type": [
        "string",
        "null"
      ]
    },
    "starts_on": {
      "type": [
        "string",
        "null"
      ],
      "description": "YYYY-MM-DD. A regular night that has not started yet runs from this date; null if already running."
    }
  }
}