mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-17 17:56:27 +00:00
Edit upstreams, added swagger docs
This commit is contained in:
@ -0,0 +1,42 @@
|
||||
{
|
||||
"operationId": "getUpstreamNginxConfig",
|
||||
"summary": "Get a Upstream Nginx Config 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": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": "# ------------------------------------------------------------\n# Upstream 1: API servers\n# ------------------------------------------------------------\nupstream npm_upstream_1 {\nserver 192.168.0.10:80 weight=100 ;\n server 192.168.0.11:80 weight=50 ;\n}\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
93
backend/embed/api_docs/paths/upstreams/upstreamID/put.json
Normal file
93
backend/embed/api_docs/paths/upstreams/upstreamID/put.json
Normal file
@ -0,0 +1,93 @@
|
||||
{
|
||||
"operationId": "updateUpstream",
|
||||
"summary": "Update an existing Upstream",
|
||||
"tags": ["Upstreams"],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "upstreamID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"required": true,
|
||||
"description": "ID of the Upstream",
|
||||
"example": 1
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "Upstream details to update",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": "{{schema.UpdateUpstream}}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": 1673234177,
|
||||
"modified_on": 1673244559,
|
||||
"user_id": 2,
|
||||
"name": "API servers 2",
|
||||
"nginx_template_id": 5,
|
||||
"ip_hash": false,
|
||||
"ntlm": false,
|
||||
"keepalive": 0,
|
||||
"keepalive_requests": 0,
|
||||
"keepalive_time": "",
|
||||
"keepalive_timeout": "",
|
||||
"advanced_config": "",
|
||||
"status": "ready",
|
||||
"error_message": "",
|
||||
"servers": [
|
||||
{
|
||||
"id": 1,
|
||||
"created_on": 1673234177,
|
||||
"modified_on": 1673244559,
|
||||
"upstream_id": 1,
|
||||
"server": "192.168.0.10:80",
|
||||
"weight": 100,
|
||||
"max_conns": 0,
|
||||
"max_fails": 0,
|
||||
"fail_timeout": 0,
|
||||
"backup": false
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"created_on": 1673234177,
|
||||
"modified_on": 1673244559,
|
||||
"upstream_id": 1,
|
||||
"server": "192.168.0.11:80",
|
||||
"weight": 50,
|
||||
"max_conns": 0,
|
||||
"max_fails": 0,
|
||||
"fail_timeout": 0,
|
||||
"backup": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user