diff --git a/Server/openapi.json b/Server/openapi.json index 6d079e685..6dc9ef360 100644 --- a/Server/openapi.json +++ b/Server/openapi.json @@ -229,6 +229,75 @@ } } }, + "/auth/refresh": { + "post": { + "tags": ["auth"], + "description": "Generates a new auth token if the refresh token is valid.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "required": false + }, + "parameters": [ + { + "name": "x-refresh-token", + "in": "header", + "description": "Refresh token required to generate a new auth token.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "authorization", + "in": "header", + "description": "Old access token, used to extract payload).", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "New access token generated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "401": { + "description": "Unauthorized or invalid refresh token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, "/auth/user/{userId}": { "put": { "tags": ["auth"],