- 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:
80
backend/embed/api_docs/paths/upstreams/post.json
Normal file
80
backend/embed/api_docs/paths/upstreams/post.json
Normal file
@ -0,0 +1,80 @@
|
||||
{
|
||||
"operationId": "createUpstream",
|
||||
"summary": "Create a new Upstream",
|
||||
"tags": ["Upstreams"],
|
||||
"requestBody": {
|
||||
"description": "Upstream to Create",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": "{{schema.CreateUpstream}}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "201 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"required": ["result"],
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/components/schemas/UpstreamObject"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": {
|
||||
"id": 6,
|
||||
"created_on": 1672806857,
|
||||
"modified_on": 1672806857,
|
||||
"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": 11,
|
||||
"created_on": 1672806857,
|
||||
"modified_on": 1672806857,
|
||||
"upstream_id": 6,
|
||||
"server": "192.168.0.10:80",
|
||||
"weight": 100,
|
||||
"max_conns": 0,
|
||||
"max_fails": 0,
|
||||
"fail_timeout": 0,
|
||||
"backup": false
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"created_on": 1672806857,
|
||||
"modified_on": 1672806857,
|
||||
"upstream_id": 6,
|
||||
"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