{ "openapi": "3.0.1", "info": { "title": "API title", "version": "API version" }, "servers": [ { "url": "http://localhost:8585", "description": "Generated server url" } ], "security": [ { "bearerAuth": [] } ], "paths": { "/chat/messages": { "post": { "tags": [ "chat-controller" ], "operationId": "addChatMessage", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestAddMessage" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/MessageDto" } } } } } } }, "/chat/add": { "post": { "tags": [ "chat-controller" ], "operationId": "addChat", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestAddChat" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/ChatDto" } } } } } } }, "/tool/token-json": { "get": { "tags": [ "tool-controller" ], "operationId": "getTokenJson", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } } } } }, "/tool/token-base64": { "get": { "tags": [ "tool-controller" ], "operationId": "getTokenBase64", "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/tool/healthcheck": { "get": { "tags": [ "tool-controller" ], "operationId": "healthCheck", "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "string" } } } } } } }, "/tool/error": { "get": { "tags": [ "tool-controller" ], "operationId": "error", "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "string" } } } } } } }, "/error": { "get": { "tags": [ "error-controller" ], "operationId": "error_1", "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "string" } } } } } } }, "/chat/{id}": { "get": { "tags": [ "chat-controller" ], "operationId": "getChat", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatDto" } } } } } } }, "/chat/{id}/messages": { "get": { "tags": [ "chat-controller" ], "operationId": "getChatMessages", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MessageDto" } } } } } } } }, "/chat/all": { "get": { "tags": [ "chat-controller" ], "operationId": "getAllChats", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ChatDto" } } } } } } } } }, "components": { "schemas": { "RequestAddMessage": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "message": { "type": "string" } } }, "MessageDto": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "content": { "type": "string" }, "creationTime": { "type": "string", "format": "date-time" }, "owner": { "$ref": "#/components/schemas/UserDto" } } }, "UserDto": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "firstname": { "type": "string" }, "lastname": { "type": "string" }, "email": { "type": "string" } } }, "RequestAddChat": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" } } }, "ChatDto": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "description": { "type": "string" }, "creationTime": { "type": "string", "format": "date-time" }, "owner": { "$ref": "#/components/schemas/UserDto" }, "users": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/MessageDto" } } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } } }