diff --git a/swagger.yaml b/swagger.yaml index 4efd80e..d0d8660 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -774,6 +774,64 @@ paths: schema: $ref: "#/components/schemas/Error" + "/users/{userId}/job-descriptions": + put: + operationId: updateUserJobDescriptions + summary: Update user job description roles + description: Updates the user's self-selected job description roles stored as a Keycloak attribute. + tags: + - Users + parameters: + - name: userId + in: path + required: true + description: The Keycloak ID of the user. + schema: + type: string + format: uuid + security: + - bearerAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateUserJobDescriptionsRequest" + responses: + "200": + description: Job description roles updated successfully. + content: + application/json: + schema: + type: object + properties: + message: + type: string + "400": + description: Invalid request. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "401": + description: Unauthorized. Missing or invalid authentication token. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "403": + description: Forbidden. The authenticated user does not have permission to perform this action. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "/users/{userId}/vacationDays": put: operationId: updateUserVacation @@ -2378,6 +2436,34 @@ components: type: integer format: int32 description: User's ID in Forecast. Used for keeping a reference of Forecast based TimeEntries and Users. + jobDescriptions: + type: array + description: User's self-selected job description roles. + items: + $ref: "#/components/schemas/JobDescriptionRole" + + JobDescriptionRole: + type: string + description: A user's self-selected job description role. + enum: + - DEVELOPER + - DESIGNER + - ARCHITECT + - ADMIN + - MANAGEMENT + - TRAINEE + + UpdateUserJobDescriptionsRequest: + type: object + description: Request body for updating user job description roles. + required: + - jobDescriptions + properties: + jobDescriptions: + type: array + description: List of selected job description roles. + items: + $ref: "#/components/schemas/JobDescriptionRole" UpdateUserAttribute: type: object