ProjectManagmentTool/api/pmt.yml

130 lines
3 KiB
YAML
Raw Normal View History

2024-09-12 22:01:00 +00:00
openapi: 3.0.0
info:
title: Project Management API
description: An API for Managing Internal tools
version: 1.0.0
servers:
- url: /api/v1
2024-09-27 10:17:17 +00:00
security:
- JWTAuth: []
2024-09-12 22:01:00 +00:00
components:
2024-09-27 10:17:17 +00:00
securitySchemes:
JWTAuth:
type: http
scheme: bearer
bearerFormat: JWT
2024-10-02 06:48:15 +00:00
schemas:
ProjectInfo:
2024-09-12 22:01:00 +00:00
type: object
2024-10-02 06:48:15 +00:00
properties:
id:
type: integer
format: int64
name:
2024-09-12 22:01:00 +00:00
type: string
2024-10-02 06:48:15 +00:00
GetAllProjectsDTO:
type: array
items:
$ref: "#/components/schemas/ProjectInfo"
2024-10-07 12:27:22 +00:00
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
2024-09-12 22:01:00 +00:00
responses:
2024-10-02 06:48:15 +00:00
UnAuthorized:
description: "Un Authorized"
2024-09-12 22:01:00 +00:00
InternalError:
description: "Internal Server Error"
content:
text/plain:
schema:
type: string
2024-10-07 12:27:22 +00:00
NotFound:
description: "Not Found"
content:
text/plain:
schema:
type: string
Conflict:
description: "Conflict"
content:
text/plain:
schema:
type: string
2024-09-12 22:01:00 +00:00
paths:
2024-10-02 06:48:15 +00:00
/project:
2024-09-12 22:01:00 +00:00
get:
2024-10-02 06:48:15 +00:00
operationId: "getAllProjects"
description: "Get a List of all Projects"
2024-09-12 22:01:00 +00:00
responses:
200:
description: "Returns a List of all Projects"
2024-09-12 22:01:00 +00:00
content:
application/json:
schema:
2024-10-02 06:48:15 +00:00
$ref: "#/components/schemas/GetAllProjectsDTO"
401:
$ref: "#/components/responses/UnAuthorized"
2024-10-07 12:27:22 +00:00
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"
2024-09-12 22:01:00 +00:00
500:
$ref: "#/components/responses/InternalError"