diff --git a/Server/openapi.json b/Server/openapi.json index 8d3fff916..e66c38294 100644 --- a/Server/openapi.json +++ b/Server/openapi.json @@ -43,5 +43,323 @@ } } } - ] + ], + "tags": [ + { + "name": "auth", + "description": "Authentication" + } + ], + "paths": { + "/auth/register": { + "post": { + "tags": ["auth"], + "description": "Register a new user", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": {} + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": {} + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": {} + } + } + } + } + }, + "/auth/login": { + "post": { + "tags": ["auth"], + "description": "Login with credentials", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": {} + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": {} + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": {} + } + } + } + } + }, + "/auth/logout": { + "post": { + "tags": ["auth"], + "description": "Logout", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": {} + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": {} + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": {} + } + } + } + } + }, + "/auth/user/:userId": { + "put": { + "tags": ["auth"], + "description": "Change user informations", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": {} + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": {} + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": {} + } + } + } + }, + "delete": { + "tags": ["auth"], + "description": "Delete user", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": {} + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": {} + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": {} + } + } + } + } + }, + "/auth/users/admin": { + "get": { + "tags": ["auth"], + "description": "Checks to see if an admin account exists", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": {} + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": {} + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": {} + } + } + } + } + }, + "/auth/users": { + "get": { + "tags": ["auth"], + "description": "Get all users", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": {} + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": {} + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": {} + } + } + } + } + }, + "/auth/invite": { + "post": { + "tags": ["auth"], + "description": "Invite people to application", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": {} + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": {} + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": {} + } + } + } + } + }, + "/auth/invite/verify": { + "post": { + "tags": ["auth"], + "description": "Verify the invite", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": {} + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": {} + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": {} + } + } + } + } + }, + "/auth/recovery/request": { + "post": { + "tags": ["auth"], + "description": "Request a recovery token", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": {} + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": {} + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": {} + } + } + } + } + }, + "/auth/recovery/validate": { + "post": { + "tags": ["auth"], + "description": "Validate recovery token", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": {} + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": {} + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": {} + } + } + } + } + }, + "/auth/recovery/reset": { + "post": { + "tags": ["auth"], + "description": "Password reset", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": {} + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": {} + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": {} + } + } + } + } + } + } }