taskManagementFrontend/taskManagement/src/app/api/api.json

468 lines
9.8 KiB
JSON
Raw Normal View History

2025-11-06 13:30:08 +00:00
{
"openapi": "3.1.0",
"info": {
"title": "OpenAPI definition",
"version": "v0"
},
"servers": [
{
"url": "http://localhost:8080",
"description": "Generated server url"
}
],
"paths": {
"/users/{id}": {
"get": {
"tags": [
"user-controller"
],
"operationId": "loadUser",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/UserDto"
}
}
}
}
}
},
"put": {
"tags": [
"user-controller"
],
"operationId": "updateUser",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserDto"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK"
}
}
},
"delete": {
"tags": [
"user-controller"
],
"operationId": "deleteUser",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/tasks/{id}": {
"get": {
"tags": [
"task-controller"
],
"operationId": "loadTask",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/TaskDto"
}
}
}
}
}
},
"put": {
"tags": [
"task-controller"
],
"operationId": "updateTask",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskDto"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK"
}
}
},
"delete": {
"tags": [
"task-controller"
],
"operationId": "deleteTask",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/projects/{id}": {
"get": {
"tags": [
"project-controller"
],
"operationId": "loadProject",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/ProjectDto"
}
}
}
}
}
},
"put": {
"tags": [
"project-controller"
],
"operationId": "updateProject",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectDto"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK"
}
}
},
"delete": {
"tags": [
"project-controller"
],
"operationId": "deleteProject",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/users": {
"get": {
"tags": [
"user-controller"
],
"operationId": "loadAllUsers",
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserDto"
}
}
}
}
}
}
},
"post": {
"tags": [
"user-controller"
],
"operationId": "createUser",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserDto"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/projects": {
"get": {
"tags": [
"project-controller"
],
"operationId": "loadAllProjects",
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProjectDto"
}
}
}
}
}
}
},
"post": {
"tags": [
"project-controller"
],
"operationId": "createProject",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectDto"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/projects/{projectId}/tasks": {
"post": {
"tags": [
"task-controller"
],
"operationId": "createTask",
"parameters": [
{
"name": "projectId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskDto"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK"
}
}
}
}
},
"components": {
"schemas": {
"TaskDto": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"OPEN",
"IN_PROGRESS",
"DONE"
]
},
"projectId": {
"type": "integer",
"format": "int32"
},
"users": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserDto"
}
}
}
},
"UserDto": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"tasks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TaskDto"
}
}
}
},
"ProjectDto": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"title": {
"type": "string"
},
"tasks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TaskDto"
}
}
}
}
}
}
}