{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hmcts/json-schema/hmcts-application-list-page-schema.json",
  "title": "application-list-page",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hmcts-application-lists-api-openapi.yml#/components/schemas/application-list-page",
  "allOf": [
    {
      "$ref": "#/$defs/page"
    },
    {
      "properties": {
        "content": {
          "items": {
            "$ref": "#/$defs/application-list-get-summary-dto"
          },
          "type": "array"
        }
      },
      "type": "object"
    }
  ],
  "$defs": {
    "application-list-get-summary-dto": {
      "description": "Lightweight DTO for Application Lists, used in list/search views.",
      "properties": {
        "id": {
          "description": "Unique identifier of the Application List.",
          "format": "uuid",
          "type": "string"
        },
        "date": {
          "description": "The calendar date on which the Application List is scheduled.",
          "format": "date",
          "type": "string"
        },
        "time": {
          "description": "The time of day at which the Application List is scheduled, seconds are optional.",
          "format": "time",
          "type": "string"
        },
        "location": {
          "description": "Location where the applications will be considered.",
          "type": "string"
        },
        "description": {
          "description": "Human-readable description of the Application List (e.g. session title or purpose).",
          "type": "string"
        },
        "entriesCount": {
          "description": "Total number of Application List Entries associated with this Application List.",
          "format": "int32",
          "type": "integer"
        },
        "status": {
          "$ref": "#/$defs/application-list-status"
        }
      },
      "required": [
        "date",
        "description",
        "id",
        "location",
        "numberOfEntries",
        "status",
        "time"
      ],
      "type": "object"
    },
    "application-list-status": {
      "description": "Status of the Application List.",
      "enum": [
        "OPEN",
        "CLOSED"
      ],
      "type": "string"
    },
    "page": {
      "description": "Generic Spring Data page.",
      "properties": {
        "pageNumber": {
          "description": "Zero-based page index.",
          "format": "int32",
          "type": "integer"
        },
        "pageSize": {
          "description": "Page size.",
          "format": "int32",
          "type": "integer"
        },
        "totalElements": {
          "description": "Total number of elements across all pages.",
          "format": "int64",
          "type": "integer"
        },
        "totalPages": {
          "description": "Total number of pages.",
          "format": "int32",
          "type": "integer"
        },
        "sort": {
          "$ref": "#/$defs/sort"
        },
        "first": {
          "type": "boolean"
        },
        "last": {
          "type": "boolean"
        },
        "elementsOnPage": {
          "description": "Total number of elements in the current page.",
          "format": "int32",
          "type": "integer"
        }
      },
      "required": [
        "content",
        "elementsOnPage",
        "pageNumber",
        "pageSize",
        "totalElements"
      ],
      "type": "object"
    },
    "sort": {
      "description": "Sorting state for the returned page.",
      "properties": {
        "orders": {
          "description": "Active sort orders in priority order.",
          "items": {
            "$ref": "#/$defs/sort_orders_inner"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "sort_orders_inner": {
      "properties": {
        "property": {
          "description": "Property name used for sorting.",
          "type": "string"
        },
        "direction": {
          "description": "Sort direction.",
          "enum": [
            "asc",
            "desc"
          ],
          "type": "string"
        }
      },
      "required": [
        "direction",
        "property"
      ],
      "type": "object"
    }
  }
}