mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-17 17:56:27 +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:
50
backend/schema/paths/reports/hosts/get.json
Normal file
50
backend/schema/paths/reports/hosts/get.json
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"operationId": "reportsHosts",
|
||||
"summary": "Report on Host Statistics",
|
||||
"tags": ["Reports"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["reports"]
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"proxy": 20,
|
||||
"redirection": 1,
|
||||
"stream": 0,
|
||||
"dead": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"proxy": {
|
||||
"type": "integer",
|
||||
"description": "Proxy Hosts Count"
|
||||
},
|
||||
"redirection": {
|
||||
"type": "integer",
|
||||
"description": "Redirection Hosts Count"
|
||||
},
|
||||
"stream": {
|
||||
"type": "integer",
|
||||
"description": "Streams Count"
|
||||
},
|
||||
"dead": {
|
||||
"type": "integer",
|
||||
"description": "404 Hosts Count"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user