From 6de7c650ea52db226edb2f1ab38009a728d6d02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20S=C3=A4ume?= Date: Wed, 23 Oct 2024 09:44:58 +0200 Subject: [PATCH] PMT-43: Define Endpoint --- api/pmt.yml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/api/pmt.yml b/api/pmt.yml index e2318d9..476a476 100644 --- a/api/pmt.yml +++ b/api/pmt.yml @@ -46,6 +46,28 @@ components: plannedEnd: type: string format: date-time + UpdateProjectDTO: + type: object + properties: + name: + type: string + goal: + type: string + customerId: + type: integer + format: int64 + administratorId: + type: integer + format: int64 + start: + type: string + format: date-time + plannedEnd: + type: string + format: date-time + end: + type: string + format: date-time CreatedProjectDTO: type: object properties: @@ -153,8 +175,7 @@ paths: $ref: "#/components/responses/InternalError" 503: $ref: "#/components/responses/ServiceUnavailable" - - + /project/{id}: post: operationId: "addEmployee" @@ -186,7 +207,36 @@ paths: $ref: "#/components/responses/InternalError" 503: $ref: "#/components/responses/ServiceUnavailable" - + put: + operationId: "updateProject" + description: "Updates a project" + parameters: + - in: path + name: id + schema: + type: integer + format: int64 + required: true + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateProjectDTO" + responses: + 204: + description: "Project updated successfully" + 401: + $ref: "#/components/responses/Unauthorized" + 404: + $ref: "#/components/responses/NotFound" + 409: + $ref: "#/components/responses/Conflict" + 422: + $ref: "#/components/responses/UnprocessableContent" + 500: + $ref: "#/components/responses/InternalError" + 503: + $ref: "#/components/responses/ServiceUnavailable" delete: operationId: "deleteProject" description: "Delete a specific Project"