Register swagger
This commit is contained in:
		
							parent
							
								
									4fb09e8fd7
								
							
						
					
					
						commit
						628d210156
					
				| @ -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 = { | login_swagger = { | ||||||
| 	"methods": ["POST"], | 	"methods": ["POST"], | ||||||
| 	"tags": ["User"], | 	"tags": ["User"], | ||||||
| @ -69,7 +95,7 @@ delete_swagger = { | |||||||
| 	{ | 	{ | ||||||
| 		"200": | 		"200": | ||||||
| 		{ | 		{ | ||||||
| 			"description": "User successfully deleted out" | 			"description": "User successfully deleted" | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user