{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/when-i-work/json-schema/when-i-work-shift-break-schema.json",
  "title": "ShiftBreak",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/when-i-work-shift-breaks-api-openapi.yml#/components/schemas/ShiftBreak",
  "type": "object",
  "required": [
    "id",
    "timeId",
    "creatorId",
    "type",
    "length",
    "isPunched"
  ],
  "properties": {
    "id": {
      "description": "The shift break id",
      "type": "integer"
    },
    "timeId": {
      "description": "The time id associated with the break",
      "type": "integer"
    },
    "creatorId": {
      "description": "The id of the user who created the break",
      "type": "integer"
    },
    "type": {
      "description": "The type of break (1=paid, 2=unpaid)",
      "type": "integer"
    },
    "length": {
      "description": "The break time rounded to the nearest minute",
      "type": "integer"
    },
    "isPunched": {
      "description": "If the break was punched",
      "type": "boolean"
    },
    "editedBy": {
      "description": "The id of the user who edited the break",
      "type": "integer"
    },
    "start": {
      "description": "The break start time",
      "type": "string",
      "format": "date-time"
    },
    "end": {
      "description": "The break end time",
      "type": "string",
      "format": "date-time"
    },
    "roundedStartTime": {
      "description": "The rounded start time. Will only be visible if rounding is enabled.",
      "type": "string",
      "format": "date-time"
    },
    "roundedEndTime": {
      "description": "The rounded end time. Will only be visible if rounding is enabled.",
      "type": "string",
      "format": "date-time"
    },
    "roundedLength": {
      "description": "The break time rounded based on the roundedStartTime and roundedEndTime if punched. If not punched, rounded to the nearest minute increment when rounding is enabled.",
      "type": "integer"
    },
    "isOrphaned": {
      "description": "If the break begins after its associated time entry ends.",
      "type": "boolean"
    },
    "scheduledBreakId": {
      "description": "The scheduled break associated with this shift break, if it is a scheduled break. Otherwise `0`",
      "type": "integer"
    }
  }
}