PMT-40: define Endpoint

This commit is contained in:
Rajbir Singh 2024-10-24 09:44:46 +02:00 committed by Dominik Säume
parent 06360ad1c6
commit 79ab6f7f48

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'