PMT-26: Define Endpoint
This commit is contained in:
parent
9fe23f3e90
commit
933ac666a8
1 changed files with 67 additions and 5 deletions
72
api/pmt.yml
72
api/pmt.yml
|
@ -77,6 +77,45 @@ components:
|
|||
qualificationId:
|
||||
type: integer
|
||||
format: int64
|
||||
Employee:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
lastName:
|
||||
type: string
|
||||
firstName:
|
||||
type: string
|
||||
street:
|
||||
type: string
|
||||
postcode:
|
||||
maxLength: 5
|
||||
minLength: 5
|
||||
type: string
|
||||
city:
|
||||
type: string
|
||||
phone:
|
||||
type: string
|
||||
skillSet:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Qualification'
|
||||
Qualification:
|
||||
type: object
|
||||
properties:
|
||||
skill:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
ProjectEmployeesDTO:
|
||||
type: object
|
||||
properties:
|
||||
employees:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Employee"
|
||||
responses:
|
||||
Unauthorized:
|
||||
description: "Unauthorized"
|
||||
|
@ -167,10 +206,10 @@ paths:
|
|||
format: int64
|
||||
required: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/AddEmployeeDTO"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/AddEmployeeDTO"
|
||||
responses:
|
||||
204:
|
||||
description: "Employee successfully added to the specific Project"
|
||||
|
@ -179,7 +218,7 @@ paths:
|
|||
404:
|
||||
$ref: "#/components/responses/NotFound"
|
||||
409:
|
||||
$ref: "#/components/responses/Conflict"
|
||||
$ref: "#/components/responses/Conflict"
|
||||
422:
|
||||
$ref: "#/components/responses/UnprocessableContent"
|
||||
500:
|
||||
|
@ -241,3 +280,26 @@ paths:
|
|||
$ref: "#/components/responses/InternalError"
|
||||
503:
|
||||
$ref: "#/components/responses/ServiceUnavailable"
|
||||
|
||||
/project/{id}/employees:
|
||||
get:
|
||||
description: "getAllEmployees"
|
||||
operationId: "Get a List of all Employees from a specific Project"
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ProjectEmployeesDTO"
|
||||
description: 'Get a List of all Employees from a specific Project '
|
||||
404:
|
||||
$ref: '#/components/responses/NotFound'
|
||||
500:
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
|
Loading…
Reference in a new issue