PMT-4: Add AddEmpployeeDTO and endpoint specification
This commit is contained in:
parent
ed7245e367
commit
2a35474ed3
1 changed files with 36 additions and 17 deletions
51
api/pmt.yml
51
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"
|
||||
|
@ -77,6 +86,12 @@ components:
|
|||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
NotAcceptable:
|
||||
description: "Not Acceptable"
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
Conflict:
|
||||
description: "Conflict"
|
||||
content:
|
||||
|
@ -147,6 +162,26 @@ paths:
|
|||
|
||||
|
||||
/project/{id}:
|
||||
post:
|
||||
operationId: "addEmployee"
|
||||
description: "Adds an employee to a specific Project"
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/AddEmployeeDTO"
|
||||
responses:
|
||||
204:
|
||||
description: "Employee successfully added to the specific Project"
|
||||
404:
|
||||
$ref: "#/components/responses/NotFound"
|
||||
406:
|
||||
$ref: "#/components/responses/NotAcceptable"
|
||||
409:
|
||||
$ref: "#/components/responses/Conflict"
|
||||
|
||||
delete:
|
||||
operationId: "deleteProject"
|
||||
description: "Delete a specific Project"
|
||||
|
@ -170,19 +205,3 @@ paths:
|
|||
type: string
|
||||
500:
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
/project/{id}/employee/{employeeId}:
|
||||
post:
|
||||
operationId: "addEmployee"
|
||||
description: "Adds an employee to a specific Project"
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
responses:
|
||||
204:
|
||||
description: "Employee successfully added to the specific Project"
|
||||
409:
|
||||
$ref: "#/components/responses/Conflict"
|
||||
404:
|
||||
$ref: "#/components/responses/NotFound"
|
||||
|
||||
|
|
Loading…
Reference in a new issue