130 lines
No EOL
3 KiB
YAML
130 lines
No EOL
3 KiB
YAML
openapi: 3.0.0
|
|
info:
|
|
title: Project Management API
|
|
description: An API for Managing Internal tools
|
|
version: 1.0.0
|
|
servers:
|
|
- url: /api/v1
|
|
security:
|
|
- JWTAuth: []
|
|
|
|
components:
|
|
securitySchemes:
|
|
JWTAuth:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: JWT
|
|
schemas:
|
|
ProjectInfo:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
format: int64
|
|
name:
|
|
type: string
|
|
GetAllProjectsDTO:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/ProjectInfo"
|
|
CreateProjectDTO:
|
|
type: object
|
|
properties:
|
|
customerId:
|
|
type: integer
|
|
format: int64
|
|
administratorId:
|
|
type: integer
|
|
format: int64
|
|
title:
|
|
type: string
|
|
goal:
|
|
type: string
|
|
start:
|
|
type: string
|
|
format: date-time
|
|
plannedEnd:
|
|
type: string
|
|
format: date-time
|
|
CreatedProjectDTO:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
format: int64
|
|
customerId:
|
|
type: integer
|
|
format: int64
|
|
administratorId:
|
|
type: integer
|
|
format: int64
|
|
title:
|
|
type: string
|
|
goal:
|
|
type: string
|
|
start:
|
|
type: string
|
|
format: date-time
|
|
plannedEnd:
|
|
type: string
|
|
format: date-time
|
|
responses:
|
|
UnAuthorized:
|
|
description: "Un Authorized"
|
|
InternalError:
|
|
description: "Internal Server Error"
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: string
|
|
NotFound:
|
|
description: "Not Found"
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: string
|
|
Conflict:
|
|
description: "Conflict"
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: string
|
|
paths:
|
|
/project:
|
|
get:
|
|
operationId: "getAllProjects"
|
|
description: "Get a List of all Projects"
|
|
responses:
|
|
200:
|
|
description: "Returns a List of all Projects"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/GetAllProjectsDTO"
|
|
401:
|
|
$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"
|
|
409:
|
|
$ref: "#/components/responses/NotFound"
|
|
500:
|
|
$ref: "#/components/responses/InternalError" |