{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenAPI definition",
    "version": "v0"
  },
  "servers": [
    {
      "url": "https://staffapi.prod.recognize.hosting",
      "description": "Generated server url"
    }
  ],
  "paths": {
    "/swagger-resources": {
      "get": {
        "tags": [
          "api-resource-controller"
        ],
        "operationId": "swaggerResources",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SwaggerResource"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/swagger-resources/configuration/ui": {
      "get": {
        "tags": [
          "api-resource-controller"
        ],
        "operationId": "uiConfiguration",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UiConfiguration"
                }
              }
            }
          }
        }
      }
    },
    "/swagger-resources/configuration/security": {
      "get": {
        "tags": [
          "api-resource-controller"
        ],
        "operationId": "securityConfiguration",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityConfiguration"
                }
              }
            }
          }
        }
      }
    },
    "/openapi/v2/api-docs": {
      "get": {
        "tags": [
          "swagger-2-controller-web-mvc"
        ],
        "operationId": "getDocumentation",
        "parameters": [
          {
            "name": "group",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "application/hal+json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/staff/functions": {
      "get": {
        "tags": [
          "Function API"
        ],
        "summary": "Get a list of all available functions",
        "operationId": "getJobFunctions",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "function_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          },
          "200": {
            "description": "All the available functions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageJobFunction"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/functions/{id}": {
      "get": {
        "tags": [
          "Function API"
        ],
        "summary": "Get the details of a function, referenced via its id",
        "operationId": "getJobFunctions_1",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "id of the function to retrieve",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Function information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobFunction"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/functions/{id}/employees": {
      "get": {
        "tags": [
          "Function API"
        ],
        "summary": "Gets a list of employees for the given function",
        "operationId": "getEmployeesWithJobFunction",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "id of the function to retrieve employees for",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The employees that have the given function",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageJobFunction"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get a list of employees, with their current function / department / manager",
        "operationId": "getEmployees",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available employees",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageEmployee"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees/{employeeId}": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get the details of an employee, including it's history of functions / departments",
        "operationId": "getEmployeeDetails",
        "parameters": [
          {
            "name": "employeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          },
          "200": {
            "description": "Detail information for the employee",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmployeeDetails"
                }
              }
            }
          },
          "404": {
            "description": "Unable to find the requested employee based on it's ID"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees/{employeeId}/schedule": {
      "get": {
        "tags": [
          "Employee Schedules / leave API"
        ],
        "summary": "Gets the work schedule for this employee in the requested period. This schedule ",
        "operationId": "getScheduleForEmployee",
        "parameters": [
          {
            "name": "employeeId",
            "in": "path",
            "description": "The employee's id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "The first date inclusive to retrieve leave for. Defaults to today",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "The last date inclusive to retrieve leave for. Defaults to today",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A (possibly empty) page of schedule entries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageScheduleEntry"
                }
              }
            }
          },
          "400": {
            "description": "One of the parameters was not accepted. For instance, the requested date lies to far in the future or the past",
            "content": {
              "/": {
                "schema": {
                  "$ref": "#/components/schemas/PageScheduleEntry"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees/{employeeId}/leave": {
      "get": {
        "tags": [
          "Employee Schedules / leave API"
        ],
        "summary": "Gets the leave for this employee in the requested period",
        "operationId": "getLeaveForEmployee",
        "parameters": [
          {
            "name": "employeeId",
            "in": "path",
            "description": "The employee's id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "The first date inclusive to retrieve leave for. Defaults to today",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "The last date inclusive to retrieve leave for. Defaults to today",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          },
          "200": {
            "description": "A (possibly empty) page of leave entries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageLeaveEntry"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees/{employeeId}/employees": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get the employees the employee is the manager of, if any",
        "operationId": "getEmployeesForManager",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "employeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "Unable to find the employee corresponding to the employee id"
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          },
          "200": {
            "description": "A list of employees the employee is the manager of",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageEmployee"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees/me": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get the employee for the authenticated user",
        "operationId": "getEmployee",
        "responses": {
          "200": {
            "description": "Information for the employee of the authenticated user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmployeeDetails"
                }
              }
            }
          },
          "404": {
            "description": "Unable to find the employee corresponding to the authenticated user"
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "azureAdToken": []
          }
        ]
      }
    },
    "/api/staff/employees/me/employees": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get the employees the logged in user is the manager of, if any",
        "operationId": "getEmployeesForManager_1",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "Unable to find the employee corresponding to the authenticated user"
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          },
          "200": {
            "description": "A list of employees the user is the manager of",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageEmployee"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "azureAdToken": []
          }
        ]
      }
    },
    "/api/staff/departments": {
      "get": {
        "tags": [
          "Departments API"
        ],
        "summary": "Get a hierarchical list of departments",
        "operationId": "getDepartmentHierarchy",
        "parameters": [
          {
            "name": "maxLayers",
            "in": "query",
            "description": "Optional: maximum hierarchy level",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available departments, grouped under the top-level department",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Department"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/departments/{departmentId}": {
      "get": {
        "tags": [
          "Departments API"
        ],
        "summary": "Get a hierarchical list of departments, starting from the mentioned department ID",
        "operationId": "getDepartmentHierarchy_1",
        "parameters": [
          {
            "name": "departmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "maxLayers",
            "in": "query",
            "description": "Optional: maximum hierarchy layers",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available departments, grouped under the top-level department",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Department"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          },
          "404": {
            "description": "Unable to find the requested department based on it's ID"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/departments/{departmentId}/employees": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get a list of employees for a specific department, with their current function / department / manager",
        "operationId": "getEmployees_1",
        "parameters": [
          {
            "name": "departmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "recurse",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          },
          "200": {
            "description": "All the available employees inside that department",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageEmployee"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "SwaggerResource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "swaggerVersion": {
            "type": "string"
          },
          "location": {
            "type": "string",
            "deprecated": true
          }
        }
      },
      "UiConfiguration": {
        "type": "object",
        "properties": {
          "deepLinking": {
            "type": "boolean"
          },
          "displayOperationId": {
            "type": "boolean"
          },
          "defaultModelsExpandDepth": {
            "type": "integer",
            "format": "int32"
          },
          "defaultModelExpandDepth": {
            "type": "integer",
            "format": "int32"
          },
          "defaultModelRendering": {
            "type": "string",
            "enum": [
              "example",
              "model"
            ]
          },
          "displayRequestDuration": {
            "type": "boolean"
          },
          "docExpansion": {
            "type": "string",
            "enum": [
              "none",
              "list",
              "full"
            ]
          },
          "filter": {
            "type": "object"
          },
          "maxDisplayedTags": {
            "type": "integer",
            "format": "int32"
          },
          "operationsSorter": {
            "type": "string",
            "enum": [
              "alpha",
              "method"
            ]
          },
          "showExtensions": {
            "type": "boolean"
          },
          "showCommonExtensions": {
            "type": "boolean"
          },
          "tagsSorter": {
            "type": "string",
            "enum": [
              "alpha"
            ]
          },
          "validatorUrl": {
            "type": "string"
          },
          "supportedSubmitMethods": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "swaggerBaseUiUrl": {
            "type": "string"
          }
        }
      },
      "SecurityConfiguration": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "deprecated": true
          },
          "apiKeyVehicle": {
            "type": "string",
            "deprecated": true
          },
          "apiKeyName": {
            "type": "string",
            "deprecated": true
          },
          "clientId": {
            "type": "string"
          },
          "clientSecret": {
            "type": "string"
          },
          "realm": {
            "type": "string"
          },
          "appName": {
            "type": "string"
          },
          "scopeSeparator": {
            "type": "string"
          },
          "additionalQueryStringParams": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "useBasicAuthenticationWithAccessCodeGrant": {
            "type": "boolean"
          },
          "enableCsrfSupport": {
            "type": "boolean"
          }
        }
      },
      "JobFunction": {
        "title": "The results",
        "type": "object",
        "properties": {
          "id": {
            "title": "The unique ID of the function",
            "type": "string"
          },
          "houseId": {
            "title": "The ID of the function in the function house",
            "type": "string"
          },
          "name": {
            "title": "The function name",
            "type": "string"
          },
          "type": {
            "title": "The function type",
            "type": "string"
          },
          "employer_id": {
            "title": "The employer associated with the function",
            "type": "string"
          },
          "employer_name": {
            "title": "The name of the employer associated with the function",
            "type": "string"
          }
        }
      },
      "PageJobFunction": {
        "type": "object",
        "properties": {
          "status": {
            "title": "The status of the response. Normally: Success",
            "type": "string"
          },
          "results": {
            "title": "The results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobFunction"
            }
          },
          "next_cursor": {
            "title": "Cursor result. pass this value into a subsequent request in order to obtain the next/previous page",
            "type": "string"
          },
          "page_size": {
            "title": "Number of results in the returned page",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "Employee": {
        "title": "The results",
        "required": [
          "departmentId",
          "departmentName",
          "employeeId",
          "employeeName",
          "employeeWorkEmailAddress",
          "employerId",
          "employerName",
          "functionHouseId",
          "functionId",
          "functionName",
          "managerEmployeeId",
          "managerName"
        ],
        "type": "object",
        "properties": {
          "employeeId": {
            "title": "The ID of this employee",
            "type": "string"
          },
          "employeeName": {
            "title": "The name of this employee",
            "type": "string"
          },
          "employeeWorkEmailAddress": {
            "title": "The work email address of this employee",
            "type": "string"
          },
          "departmentId": {
            "title": "The department ID of this employee",
            "type": "string"
          },
          "departmentName": {
            "title": "The department name",
            "type": "string"
          },
          "functionId": {
            "title": "The function ID",
            "type": "string"
          },
          "functionHouseId": {
            "title": "The house ID of the function",
            "type": "string"
          },
          "functionName": {
            "title": "The function name",
            "type": "string"
          },
          "functionStartdate": {
            "title": "Startdate of this function.",
            "type": "string",
            "format": "date"
          },
          "functionEnddate": {
            "title": "Enddate of this function.",
            "type": "string",
            "format": "date"
          },
          "managerEmployeeId": {
            "title": "The employee ID of the manager for this department",
            "type": "string"
          },
          "managerName": {
            "title": "The name of the manager for this department",
            "type": "string"
          },
          "employerId": {
            "title": "The ID of the employer",
            "type": "string"
          },
          "employerName": {
            "title": "The name of the employer",
            "type": "string"
          },
          "isManager": {
            "title": "True if this employee is a manager",
            "type": "boolean"
          },
          "costCentre": {
            "title": "The employee cost centre",
            "type": "string"
          },
          "costCentreDescription": {
            "title": "The employee cost centre description",
            "type": "string"
          },
          "costBearer": {
            "title": "The cost bearer for the employee",
            "type": "string"
          },
          "postingCode": {
            "title": "The employee posting code",
            "type": "string"
          },
          "posting": {
            "title": "The employee posting. Usually a city, but may be more specific",
            "type": "string"
          },
          "phoneNumberWork": {
            "title": "The employee's work phone number",
            "type": "string"
          }
        }
      },
      "PageEmployee": {
        "type": "object",
        "properties": {
          "status": {
            "title": "The status of the response. Normally: Success",
            "type": "string"
          },
          "results": {
            "title": "The results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Employee"
            }
          },
          "next_cursor": {
            "title": "Cursor result. pass this value into a subsequent request in order to obtain the next/previous page",
            "type": "string"
          },
          "page_size": {
            "title": "Number of results in the returned page",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "EmployeeDetails": {
        "required": [
          "employeeId",
          "employeeName",
          "employeeWorkEmailAddress"
        ],
        "type": "object",
        "properties": {
          "employeeId": {
            "title": "The ID of this employee",
            "type": "string"
          },
          "employeeName": {
            "title": "The name of this employee",
            "type": "string"
          },
          "employeeWorkEmailAddress": {
            "title": "The work email address of this employee",
            "type": "string"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Employee"
            }
          }
        }
      },
      "PageScheduleEntry": {
        "type": "object",
        "properties": {
          "status": {
            "title": "The status of the response. Normally: Success",
            "type": "string"
          },
          "results": {
            "title": "The results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleEntry"
            }
          },
          "next_cursor": {
            "title": "Cursor result. pass this value into a subsequent request in order to obtain the next/previous page",
            "type": "string"
          },
          "page_size": {
            "title": "Number of results in the returned page",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ScheduleEntry": {
        "title": "The results",
        "required": [
          "employeeId"
        ],
        "type": "object",
        "properties": {
          "employeeId": {
            "title": "The ID of this employee",
            "type": "string"
          },
          "startDate": {
            "title": "The start day of the scheduled item",
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "title": "The end day of the scheduled item",
            "type": "string",
            "format": "date"
          },
          "startTime": {
            "type": "string"
          },
          "endTime": {
            "type": "string"
          },
          "breakDuration": {
            "title": "The duration of a possible break in minutes. Zero for no scheduled break",
            "type": "integer",
            "format": "int32"
          },
          "hours": {
            "title": "The duration of the scheduled item in hours",
            "type": "number"
          }
        }
      },
      "LeaveEntry": {
        "title": "The results",
        "required": [
          "employeeId"
        ],
        "type": "object",
        "properties": {
          "employeeId": {
            "title": "The ID of this employee",
            "type": "string"
          },
          "startDate": {
            "title": "The start day of the scheduled item",
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "title": "The end day of the scheduled item",
            "type": "string",
            "format": "date"
          },
          "startTime": {
            "type": "string"
          },
          "endTime": {
            "type": "string"
          },
          "breakDuration": {
            "title": "The duration of a possible break in minutes. Zero for no scheduled break",
            "type": "integer",
            "format": "int32"
          },
          "hours": {
            "title": "The duration of the scheduled item in hours",
            "type": "number"
          },
          "sickLeave": {
            "title": "This entry represents sick leave. Note that leave code and description may be absent if this is true",
            "type": "boolean"
          },
          "leaveCode": {
            "title": "The leave code of the leave entry. Precise meaning depends on the backend and possibly if the leave is composite",
            "type": "string"
          },
          "leaveDescription": {
            "title": "The description for the given leave",
            "type": "string"
          },
          "composite": {
            "title": "If this is true the leave is composed of multiple leave types. Rarely true",
            "type": "boolean"
          }
        }
      },
      "PageLeaveEntry": {
        "type": "object",
        "properties": {
          "status": {
            "title": "The status of the response. Normally: Success",
            "type": "string"
          },
          "results": {
            "title": "The results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaveEntry"
            }
          },
          "next_cursor": {
            "title": "Cursor result. pass this value into a subsequent request in order to obtain the next/previous page",
            "type": "string"
          },
          "page_size": {
            "title": "Number of results in the returned page",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "Department": {
        "required": [
          "departmentId",
          "departmentName",
          "layer",
          "managerEmployeeId",
          "managerName",
          "managerWorkEmailAddress",
          "parentDepartmentId"
        ],
        "type": "object",
        "properties": {
          "departmentId": {
            "title": "The ID of this department",
            "type": "string"
          },
          "departmentName": {
            "title": "The name of this department",
            "type": "string"
          },
          "layer": {
            "title": "The layer of this department",
            "type": "string"
          },
          "parentDepartmentId": {
            "title": "The parent ID for this department, null in case it's the top-level department",
            "type": "string"
          },
          "managerEmployeeId": {
            "title": "The employee ID of the manager for this department",
            "type": "string"
          },
          "managerName": {
            "title": "The name of the manager for this department",
            "type": "string"
          },
          "managerWorkEmailAddress": {
            "title": "The work email address of the manager for this department",
            "type": "string"
          },
          "childDepartments": {
            "title": "The child departments, if present",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Department"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "name": "X-API-KEY",
        "in": "header"
      },
      "azureAdToken": {
        "type": "oauth2",
        "description": "Valid Azure AD token representing a Hanab employee",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://login.microsoftonline.com/common/v2.0",
            "scopes": {
              "openid": "OpenID scope"
            }
          }
        }
      }
    }
  }
}
