mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-31 15:53:33 +00:00 
			
		
		
		
	Refactor API Schema and validation
- /schema now returns full openapi/swagger schema - That schema is used to validate incoming requests - And used as a contract in future integration tests - Moved route files up one level - Fixed incorrect 404 reponses when getting objects - Fixed saving new objects and passing jsonschemavalidation
This commit is contained in:
		
							
								
								
									
										53
									
								
								backend/schema/paths/audit-log/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								backend/schema/paths/audit-log/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,53 @@ | ||||
| { | ||||
| 	"operationId": "getAuditLog", | ||||
| 	"summary": "Get Audit Log", | ||||
| 	"tags": ["Audit Log"], | ||||
| 	"security": [ | ||||
| 		{ | ||||
| 			"BearerAuth": ["audit-log"] | ||||
| 		} | ||||
| 	], | ||||
| 	"responses": { | ||||
| 		"200": { | ||||
| 			"description": "200 response", | ||||
| 			"content": { | ||||
| 				"application/json": { | ||||
| 					"examples": { | ||||
| 						"default": { | ||||
| 							"value": [ | ||||
| 								{ | ||||
| 									"id": 7, | ||||
| 									"created_on": "2024-10-08T13:09:54.000Z", | ||||
| 									"modified_on": "2024-10-08T13:09:54.000Z", | ||||
| 									"user_id": 1, | ||||
| 									"object_type": "user", | ||||
| 									"object_id": 3, | ||||
| 									"action": "updated", | ||||
| 									"meta": { | ||||
| 										"name": "John Doe", | ||||
| 										"permissions": { | ||||
| 											"user_id": 3, | ||||
| 											"visibility": "all", | ||||
| 											"access_lists": "manage", | ||||
| 											"dead_hosts": "hidden", | ||||
| 											"proxy_hosts": "manage", | ||||
| 											"redirection_hosts": "view", | ||||
| 											"streams": "hidden", | ||||
| 											"certificates": "manage", | ||||
| 											"id": 3, | ||||
| 											"modified_on": "2024-10-08T13:09:54.000Z", | ||||
| 											"created_on": "2024-10-08T13:09:51.000Z" | ||||
| 										} | ||||
| 									} | ||||
| 								} | ||||
| 							] | ||||
| 						} | ||||
| 					}, | ||||
| 					"schema": { | ||||
| 						"$ref": "../../components/audit-log-object.json" | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
		Reference in New Issue
	
	Block a user