mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-11-04 01:15:14 +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:
		
							
								
								
									
										40
									
								
								backend/schema/paths/nginx/certificates/test-http/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								backend/schema/paths/nginx/certificates/test-http/get.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
			
		||||
{
 | 
			
		||||
	"operationId": "testHttpReach",
 | 
			
		||||
	"summary": "Test HTTP Reachability",
 | 
			
		||||
	"tags": ["Certificates"],
 | 
			
		||||
	"security": [
 | 
			
		||||
		{
 | 
			
		||||
			"BearerAuth": ["certificates"]
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
	"parameters": [
 | 
			
		||||
		{
 | 
			
		||||
			"in": "query",
 | 
			
		||||
			"name": "domains",
 | 
			
		||||
			"description": "Expansions",
 | 
			
		||||
			"required": true,
 | 
			
		||||
			"schema": {
 | 
			
		||||
				"type": "string",
 | 
			
		||||
				"example": "[\"test.example.ord\",\"test.example.com\",\"nonexistent.example.com\"]"
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
	"responses": {
 | 
			
		||||
		"200": {
 | 
			
		||||
			"description": "200 response",
 | 
			
		||||
			"content": {
 | 
			
		||||
				"application/json": {
 | 
			
		||||
					"examples": {
 | 
			
		||||
						"default": {
 | 
			
		||||
							"value": {
 | 
			
		||||
								"test.example.org": "ok",
 | 
			
		||||
								"test.example.com": "other:Invalid domain or IP",
 | 
			
		||||
								"nonexistent.example.com": "404"
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user