diff --git a/app/doc/user_swag.py b/app/doc/user_swag.py index 477b5cf..0daf96b 100644 --- a/app/doc/user_swag.py +++ b/app/doc/user_swag.py @@ -1,3 +1,29 @@ +register_swagger = { + "methods": ["POST"], + "tags": ["User"], + "description": "Registers a new user in the app. Also sends a notification to the user via the provided email", + "parameters": + [ + { + "in": "body", + "name": "body", + "description": "Username, displayname and password of the new user\n- Username can be only lowercase and up to 64 characters\n- Displayname can contain special characters (. _ -) and lower and upper characters\n- Password must be at least 8 characters long, contain both lower and upper characters, numbers and special characters\n- Email has to be in format \"name@domain.tld\" and up to 64 characters long in total", + "required": True, + "schema": + { + "type": "object", + "properties": + { + "username": {"type": "string", "example": "mycoolusername"}, + "email": {"type": "string", "example": "mymail@dot.com"}, + "displayname": {"type": "string", "example": "MyCoolDisplayName"}, + "password": {"type": "string", "example": "My5tr0ngP@55w0rd"} + } + } + } + ], +} + login_swagger = { "methods": ["POST"], "tags": ["User"], @@ -69,7 +95,7 @@ delete_swagger = { { "200": { - "description": "User successfully deleted out" + "description": "User successfully deleted" } } } \ No newline at end of file