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:
|
plannedEnd:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
AddEmployeeDTO:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
employeeId:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
qualificationId:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
responses:
|
responses:
|
||||||
Unauthorized:
|
Unauthorized:
|
||||||
description: "Unauthorized"
|
description: "Unauthorized"
|
||||||
|
@ -77,6 +86,12 @@ components:
|
||||||
text/plain:
|
text/plain:
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
NotAcceptable:
|
||||||
|
description: "Not Acceptable"
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
Conflict:
|
Conflict:
|
||||||
description: "Conflict"
|
description: "Conflict"
|
||||||
content:
|
content:
|
||||||
|
@ -147,6 +162,26 @@ paths:
|
||||||
|
|
||||||
|
|
||||||
/project/{id}:
|
/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:
|
delete:
|
||||||
operationId: "deleteProject"
|
operationId: "deleteProject"
|
||||||
description: "Delete a specific Project"
|
description: "Delete a specific Project"
|
||||||
|
@ -170,19 +205,3 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
500:
|
500:
|
||||||
$ref: "#/components/responses/InternalError"
|
$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