{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bodyspec/json-schema/bodyspec-service-response-schema.json",
  "title": "ServiceResponse",
  "description": "Response model for getting a single service.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bodyspec-services-api-openapi.yml#/components/schemas/ServiceResponse",
  "properties": {
    "service": {
      "$ref": "#/$defs/Service"
    }
  },
  "type": "object",
  "required": [
    "service"
  ],
  "x-internal": true,
  "$defs": {
    "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."
    }
  }
}