PMT-16: Add Endpoint Specification
This commit is contained in:
parent
5c06b052af
commit
f774450986
1 changed files with 71 additions and 3 deletions
74
api/pmt.yml
74
api/pmt.yml
|
@ -27,9 +27,56 @@ components:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/ProjectInfo"
|
$ref: "#/components/schemas/ProjectInfo"
|
||||||
|
CreateProjectDTO:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
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
|
||||||
|
CreatedProjectDTO:
|
||||||
|
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
|
||||||
responses:
|
responses:
|
||||||
UnAuthorized:
|
Unauthorized:
|
||||||
description: "Un Authorized"
|
description: "Unauthorized"
|
||||||
|
NotFound:
|
||||||
|
description: "Not Found"
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
InternalError:
|
InternalError:
|
||||||
description: "Internal Server Error"
|
description: "Internal Server Error"
|
||||||
content:
|
content:
|
||||||
|
@ -49,6 +96,27 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/GetAllProjectsDTO"
|
$ref: "#/components/schemas/GetAllProjectsDTO"
|
||||||
401:
|
401:
|
||||||
$ref: "#/components/responses/UnAuthorized"
|
$ref: "#/components/responses/Unauthorized"
|
||||||
|
500:
|
||||||
|
$ref: "#/components/responses/InternalError"
|
||||||
|
post:
|
||||||
|
operationId: "CreateProject"
|
||||||
|
description: "Creates a new Project"
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/CreateProjectDTO"
|
||||||
|
responses:
|
||||||
|
201:
|
||||||
|
description: "Project created successfully"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/CreatedProjectDTO"
|
||||||
|
401:
|
||||||
|
$ref: "#/components/responses/Unauthorized"
|
||||||
|
404:
|
||||||
|
$ref: "#/components/responses/NotFound"
|
||||||
500:
|
500:
|
||||||
$ref: "#/components/responses/InternalError"
|
$ref: "#/components/responses/InternalError"
|
Loading…
Reference in a new issue