{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bodyspec/json-schema/bodyspec-services-list-response-schema.json",
  "title": "ServicesListResponse",
  "description": "Response model for listing services.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bodyspec-services-api-openapi.yml#/components/schemas/ServicesListResponse",
  "properties": {
    "services": {
      "items": {
        "$ref": "#/$defs/Service"
      },
      "type": "array",
      "title": "Services"
    },
    "pagination": {
      "$ref": "#/$defs/Pagination"
    }
  },
  "type": "object",
  "required": [
    "services",
    "pagination"
  ],
  "x-internal": true,
  "$defs": {
    "Pagination": {
      "properties": {
        "page": {
          "type": "integer",
          "title": "Page",
          "description": "Current page number"
        },
        "page_size": {
          "type": "integer",
          "title": "Page Size",
          "description": "Number of items per page"
        },
        "results": {
          "type": "integer",
          "title": "Results",
          "description": "Number of results in this page"
        },
        "has_more": {
          "type": "boolean",
          "title": "Has More",
          "description": "Whether more results exist after this page"
        }
      },
      "type": "object",
      "required": [
        "page",
        "page_size",
        "results",
        "has_more"
      ],
      "title": "Pagination",
      "description": "Pagination information for list responses.",
      "x-internal": true
    },
    "Service": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Short name of the service (e.g., 'DEXA')"
        },
        "description": {
          "type": "string",
          "title": "Description",
          "description": "Full descriptive name of the service"
        },
        "service_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Service Id",
          "description": "Unique identifier for the service"
        },
        "service_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Service Code",
          "description": "Service code (e.g., 'DXA', 'RMR', 'VO2')"
        },
        "duration_minutes": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Duration Minutes",
          "description": "Typical duration in minutes"
        },
        "last_updated": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Updated",
          "description": "Last update timestamp in ISO 8601 UTC format"
        }
      },
      "type": "object",
      "required": [
        "name",
        "description"
      ],
      "title": "Service",
      "description": "Service model representing a bookable scan or test type."
    }
  }
}