mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-17 17:56:27 +00:00
- Added upstream objects
- Renamed host templates to nginx templates - Generate upstream templates - Better nginx error reporting when reloading - Use tparse for golang test reporting
This commit is contained in:
@ -0,0 +1,58 @@
|
||||
{
|
||||
"operationId": "deleteUpstream",
|
||||
"summary": "Delete a Upstream",
|
||||
"tags": ["Upstreams"],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "upstreamID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"required": true,
|
||||
"description": "Numeric ID of the Upstream",
|
||||
"example": 1
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "400 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": null,
|
||||
"error": {
|
||||
"code": 400,
|
||||
"message": "You cannot delete a Upstream that is in use!"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
81
backend/embed/api_docs/paths/upstreams/upstreamID/get.json
Normal file
81
backend/embed/api_docs/paths/upstreams/upstreamID/get.json
Normal file
@ -0,0 +1,81 @@
|
||||
{
|
||||
"operationId": "getUpstream",
|
||||
"summary": "Get a Upstream object by ID",
|
||||
"tags": ["Upstreams"],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "upstreamID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"required": true,
|
||||
"description": "ID of the Upstream",
|
||||
"example": 1
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"required": ["result"],
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/components/schemas/UpstreamObject"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": {
|
||||
"id": 1,
|
||||
"created_on": 1672786008,
|
||||
"modified_on": 1672786008,
|
||||
"user_id": 2,
|
||||
"name": "API servers 3",
|
||||
"ip_hash": true,
|
||||
"ntlm": false,
|
||||
"keepalive": 10,
|
||||
"keepalive_requests": 10,
|
||||
"keepalive_time": "60s",
|
||||
"keepalive_timeout": "3s",
|
||||
"advanced_config": "",
|
||||
"servers": [
|
||||
{
|
||||
"id": 1,
|
||||
"created_on": 1672786009,
|
||||
"modified_on": 1672786009,
|
||||
"upstream_id": 1,
|
||||
"server": "api1.localhost:1234",
|
||||
"weight": 100,
|
||||
"max_conns": 0,
|
||||
"max_fails": 0,
|
||||
"fail_timeout": 0,
|
||||
"backup": false
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"created_on": 1672786009,
|
||||
"modified_on": 1672786009,
|
||||
"upstream_id": 1,
|
||||
"server": "api2.localhost:1234",
|
||||
"weight": 50,
|
||||
"max_conns": 0,
|
||||
"max_fails": 0,
|
||||
"fail_timeout": 0,
|
||||
"backup": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user