PMT-40: alle Projekte eines Bestimmten Mitarbeiters abfragen #18

Merged
SZUT-Dominik merged 4 commits from story/PMT-40-alle-projekte-eines-bestimmten into trunk 2024-10-24 09:02:40 +00:00
Showing only changes of commit 79ab6f7f48 - Show all commits

View file

@ -112,6 +112,31 @@ components:
plannedEnd: plannedEnd:
type: string type: string
format: date-time 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: AddEmployeeDTO:
type: object type: object
properties: properties:
@ -160,6 +185,13 @@ components:
type: array type: array
items: items:
$ref: "#/components/schemas/Employee" $ref: "#/components/schemas/Employee"
EmployeeProjectsDTO:
type: object
properties:
projects:
type: array
items:
$ref: '#/components/schemas/Project'
responses: responses:
Unauthorized: Unauthorized:
description: "Unauthorized" description: "Unauthorized"
@ -416,3 +448,27 @@ paths:
$ref: '#/components/responses/NotFound' $ref: '#/components/responses/NotFound'
500: 500:
$ref: "#/components/responses/InternalError" $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'
401:
$ref: "#/components/responses/Unauthorized"
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalError'