{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lucca/json-schema/lucca-working-time-arrangements-read-schema.json",
  "title": "working-time-arrangements.read",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lucca-working-time-arrangements-api-openapi.yml#/components/schemas/working-time-arrangements.read",
  "allOf": [
    {
      "$ref": "#/$defs/working-time-arrangements"
    },
    {
      "$ref": "#/$defs/working-time-arrangement.embedded"
    }
  ],
  "$defs": {
    "collection.links": {
      "type": "object",
      "properties": {
        "links": {
          "title": "Links",
          "description": "Links to related resources",
          "type": [
            "object",
            "null"
          ],
          "required": [
            "prev",
            "next"
          ],
          "properties": {
            "prev": {
              "description": "Link to the previous page, or `null` when there is none.\nIt may be set on the first page, and then leads to an empty page.",
              "allOf": [
                {
                  "$ref": "#/$defs/page-link"
                }
              ]
            },
            "next": {
              "description": "Link to the next page, or `null` when there is none: stop paging when `next` is `null`.\nIt may be set on the last page when that page is full, and then leads to an empty page whose `next` is `null`.",
              "allOf": [
                {
                  "$ref": "#/$defs/page-link"
                }
              ]
            }
          }
        }
      }
    },
    "isArchived": {
      "type": "boolean",
      "description": "When false, resource is not archived.\nWhen true, resource is archived.\n\nYou can update this property in order to set the\narchival status of the resource."
    },
    "page-link": {
      "title": "page-link",
      "description": "Link to another page of a collection.",
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "properties": {
        "href": {
          "type": "string",
          "format": "uri",
          "description": "URL of the page."
        }
      },
      "required": [
        "href"
      ]
    },
    "public-holidays-calendar-reference": {
      "title": "holidays-calendar-reference",
      "description": "Reference to a [holidays-calendar](../schedules/holidays-calendar) resource.",
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "type": {
          "type": "string",
          "const": "public-holidays-calendar"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "working-time-arrangement": {
      "title": "working-time-arrangement",
      "description": "A working-time-arrangement dictates the time management rules employees are subject to via their job-position:\n\n- indicates their contractual working time, i.e. how many hours / days they are paid for each week / year;\n- gives a full time equivalent ratio based on the the ratio between this contractual work duration and a \"full time work duration\";\n- provides a succession of work cycles that describe their usual daily working hours.",
      "x-tags": [
        "working-time-arrangements"
      ],
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "type": {
          "type": "string",
          "const": "working-time-arrangement"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "name": {
          "description": "Name of this working-time-arrangement.",
          "type": "string",
          "minLength": 1
        },
        "publicHolidaysCalendar": {
          "description": "Reference to the public holidays calendar that applies to this working-time-arrangement.",
          "$ref": "#/$defs/public-holidays-calendar-reference"
        },
        "isArchived": {
          "$ref": "#/$defs/isArchived"
        },
        "links": {
          "type": "object"
        }
      }
    },
    "working-time-arrangement.embedded": {
      "type": "object",
      "properties": {
        "embedded": {
          "description": "No embedded resources on a working-time-arrangement(s) response. Expect an empty object if embedded are requested.",
          "type": [
            "null",
            "object"
          ]
        }
      }
    },
    "working-time-arrangements": {
      "title": "working-time-arrangements",
      "description": "Collection of working-time-arrangement resources.",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "working-time-arrangements"
            },
            "url": {
              "type": "string",
              "format": "uri"
            },
            "totalCount": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0,
              "description": "Total number of working-time-arrangement resources across all pages that satisfy query parameters."
            },
            "items": {
              "type": "array",
              "minItems": 0,
              "maxItems": 1000,
              "items": {
                "$ref": "#/$defs/working-time-arrangement"
              }
            }
          }
        },
        {
          "$ref": "#/$defs/collection.links"
        }
      ]
    }
  }
}