Swagger/openapi schema mega fixes and Cypress validation/enforcement

This commit is contained in:
Jamie Curnow
2025-10-29 20:15:00 +10:00
parent 89abb9d559
commit 906ce8ced2
80 changed files with 2007 additions and 543 deletions

View File

@@ -1,10 +1,12 @@
{
"operationId": "createProxyHost",
"summary": "Create a Proxy Host",
"tags": ["Proxy Hosts"],
"tags": ["proxy-hosts"],
"security": [
{
"BearerAuth": ["proxy_hosts"]
"bearerAuth": [
"proxy_hosts.manage"
]
}
],
"requestBody": {
@@ -15,7 +17,12 @@
"schema": {
"type": "object",
"additionalProperties": false,
"required": ["domain_names", "forward_scheme", "forward_host", "forward_port"],
"required": [
"domain_names",
"forward_scheme",
"forward_host",
"forward_port"
],
"properties": {
"domain_names": {
"$ref": "../../../components/proxy-host-object.json#/properties/domain_names"
@@ -69,6 +76,14 @@
"$ref": "../../../components/proxy-host-object.json#/properties/locations"
}
}
},
"example": {
"domain_names": [
"test.example.com"
],
"forward_scheme": "http",
"forward_host": "127.0.0.1",
"forward_port": 8080
}
}
}
@@ -81,13 +96,15 @@
"examples": {
"default": {
"value": {
"id": 1,
"created_on": "2024-10-08T23:23:03.000Z",
"modified_on": "2024-10-08T23:23:03.000Z",
"id": 3,
"created_on": "2025-10-30T01:12:05.000Z",
"modified_on": "2025-10-30T01:12:05.000Z",
"owner_user_id": 1,
"domain_names": ["test.example.com"],
"domain_names": [
"test.example.com"
],
"forward_host": "127.0.0.1",
"forward_port": 8989,
"forward_port": 8080,
"access_list_id": 0,
"certificate_id": 0,
"ssl_forced": false,
@@ -99,20 +116,22 @@
"http2_support": false,
"forward_scheme": "http",
"enabled": true,
"locations": [],
"hsts_enabled": false,
"hsts_subdomains": false,
"certificate": null,
"owner": {
"id": 1,
"created_on": "2024-10-07T22:43:55.000Z",
"modified_on": "2024-10-08T12:52:54.000Z",
"is_deleted": false,
"created_on": "2025-10-28T00:50:24.000Z",
"modified_on": "2025-10-28T00:50:24.000Z",
"is_disabled": false,
"email": "admin@example.com",
"name": "Administrator",
"nickname": "some guy",
"avatar": "//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?default=mm",
"roles": ["admin"]
"email": "jc@jc21.com",
"name": "jamiec",
"nickname": "jamiec",
"avatar": "//www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?default=mm",
"roles": [
"admin"
]
},
"access_list": null
}