From 675e9a3449a0b73c29ce8fc53d470c586437f1e1 Mon Sep 17 00:00:00 2001 From: Rajbir Singh Date: Mon, 21 Oct 2024 12:58:41 +0200 Subject: [PATCH] PMT-4: Define Endpoint --- api/pmt.yml | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/api/pmt.yml b/api/pmt.yml index 3b22c8e..e2318d9 100644 --- a/api/pmt.yml +++ b/api/pmt.yml @@ -68,6 +68,15 @@ components: plannedEnd: type: string format: date-time + AddEmployeeDTO: + type: object + properties: + employeeId: + type: integer + format: int64 + qualificationId: + type: integer + format: int64 responses: Unauthorized: description: "Unauthorized" @@ -147,6 +156,37 @@ paths: /project/{id}: + post: + operationId: "addEmployee" + description: "Adds an employee to a specific Project" + parameters: + - in: path + name: id + schema: + type: integer + format: int64 + required: true + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AddEmployeeDTO" + responses: + 204: + description: "Employee successfully added to the specific Project" + 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" @@ -170,4 +210,3 @@ paths: type: string 500: $ref: "#/components/responses/InternalError" -