{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rotageek/json-schema/rotageek-rotageek-asp-net-core-public-api-models-create-leave-request-model-schema.json",
  "title": "Rotageek.AspNetCore.PublicApi.Models.CreateLeaveRequestModel",
  "description": "Container for leave request creation object",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rotageek-leave-api-openapi.yml#/components/schemas/Rotageek.AspNetCore.PublicApi.Models.CreateLeaveRequestModel",
  "required": [
    "leaveTypeId"
  ],
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "description": "Leave request start date",
      "format": "date-time"
    },
    "end": {
      "type": "string",
      "description": "Leave request end date",
      "format": "date-time"
    },
    "startAllDay": {
      "type": "boolean",
      "description": "Indicates whether leave request start day is a whole day"
    },
    "endAllDay": {
      "type": "boolean",
      "description": "Indicates whether leave request end day is a whole day"
    },
    "leaveTypeId": {
      "minLength": 1,
      "type": "string",
      "description": "Leave type id of this leave request"
    },
    "status": {
      "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.LeaveRequestStatus"
    },
    "leaveDays": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.LeaveDayModel"
      },
      "description": "Duration of each leave day in hours. If a day is not specified then it will be treated as having a duration of 0."
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "description": "Leave request notes"
    },
    "response": {
      "type": [
        "string",
        "null"
      ],
      "description": "Leave request response from manager"
    },
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "New unique leave request id (max length: 36)"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Rotageek.AspNetCore.PublicApi.Models.LeaveDayModel": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "description": "Leave day date",
          "format": "date-time"
        },
        "duration": {
          "type": "number",
          "description": "Leave duration in this leave day",
          "format": "float"
        }
      },
      "additionalProperties": false,
      "description": "Container for leave request day response object"
    },
    "Rotageek.AspNetCore.PublicApi.Models.LeaveRequestStatus": {
      "enum": [
        "Outstanding",
        "Approved",
        "Rejected",
        "Cancelled"
      ],
      "type": "string",
      "description": "Describes the leave request status"
    }
  }
}