diff --git a/api/pmt.yml b/api/pmt.yml index 0a6419a..4fd501c 100644 --- a/api/pmt.yml +++ b/api/pmt.yml @@ -87,6 +87,31 @@ components: plannedEnd: type: string format: date-time + Project: + type: object + properties: + id: + type: integer + format: int64 + 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 + realEnd: + type: string + format: date-time AddEmployeeDTO: type: object properties: @@ -135,6 +160,13 @@ components: type: array items: $ref: "#/components/schemas/Employee" + EmployeeProjectsDTO: + type: object + properties: + projects: + type: array + items: + $ref: '#/components/schemas/Project' responses: Unauthorized: description: "Unauthorized" @@ -366,3 +398,25 @@ paths: $ref: '#/components/responses/NotFound' 500: $ref: "#/components/responses/InternalError" + /employye/{id}/projects: + get: + description: "getAllProjects" + operationId: "Get a List of all Projects from a specific Employee" + parameters: + - in: path + name: id + schema: + type: integer + format: int64 + required: true + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/EmployeeProjectsDTO" + description: 'Get a List of all Projects from a specific Employee' + 404: + $ref: '#/components/responses/NotFound' + 500: + $ref: '#/components/responses/InternalError'