diff --git a/apps/api/v2/src/modules/ooo/inputs/ooo.input.ts b/apps/api/v2/src/modules/ooo/inputs/ooo.input.ts index 1e67a9bb50..f29e935e5a 100644 --- a/apps/api/v2/src/modules/ooo/inputs/ooo.input.ts +++ b/apps/api/v2/src/modules/ooo/inputs/ooo.input.ts @@ -74,6 +74,7 @@ export class CreateOutOfOfficeEntryDto { @ApiPropertyOptional({ description: "the reason for the out of office entry, if applicable", example: "vacation", + enum: OutOfOfficeReason, }) reason?: OutOfOfficeReasonType; } diff --git a/apps/api/v2/src/modules/ooo/outputs/ooo.output.ts b/apps/api/v2/src/modules/ooo/outputs/ooo.output.ts index 48a62e4001..7cb39c1d93 100644 --- a/apps/api/v2/src/modules/ooo/outputs/ooo.output.ts +++ b/apps/api/v2/src/modules/ooo/outputs/ooo.output.ts @@ -69,6 +69,7 @@ export class UserOooOutputDto { @ApiPropertyOptional({ description: "the reason for the out of office entry, if applicable", example: "vacation", + enum: OutOfOfficeReason, }) @Expose() reason?: OutOfOfficeReason; diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json index f04d0a9cc8..d3ef322329 100644 --- a/apps/api/v2/swagger/documentation.json +++ b/apps/api/v2/swagger/documentation.json @@ -13620,9 +13620,16 @@ "example": 2 }, "reason": { - "type": "object", + "type": "string", "description": "the reason for the out of office entry, if applicable", - "example": "vacation" + "example": "vacation", + "enum": [ + "unspecified", + "vacation", + "travel", + "sick", + "public_holiday" + ] } }, "required": [ @@ -13656,9 +13663,16 @@ "example": 2 }, "reason": { - "type": "object", + "type": "string", "description": "the reason for the out of office entry, if applicable", - "example": "vacation" + "example": "vacation", + "enum": [ + "unspecified", + "vacation", + "travel", + "sick", + "public_holiday" + ] } } }, diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json index dc0446dd31..f2c7847f8a 100644 --- a/docs/api-reference/v2/openapi.json +++ b/docs/api-reference/v2/openapi.json @@ -12315,9 +12315,10 @@ "example": 2 }, "reason": { - "type": "object", + "type": "string", "description": "the reason for the out of office entry, if applicable", - "example": "vacation" + "example": "vacation", + "enum": ["unspecified", "vacation", "travel", "sick", "public_holiday"] } }, "required": ["start", "end"] @@ -12348,9 +12349,10 @@ "example": 2 }, "reason": { - "type": "object", + "type": "string", "description": "the reason for the out of office entry, if applicable", - "example": "vacation" + "example": "vacation", + "enum": ["unspecified", "vacation", "travel", "sick", "public_holiday"] } } },