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

@@ -24,7 +24,6 @@
"hsts_enabled",
"hsts_subdomains"
],
"additionalProperties": false,
"properties": {
"id": {
"$ref": "../common.json#/properties/id"
@@ -44,12 +43,14 @@
"forward_host": {
"type": "string",
"minLength": 1,
"maxLength": 255
"maxLength": 255,
"example": "127.0.0.1"
},
"forward_port": {
"type": "integer",
"minimum": 1,
"maximum": 65535
"maximum": 65535,
"example": 8080
},
"access_list_id": {
"$ref": "../common.json#/properties/access_list_id"
@@ -67,22 +68,28 @@
"$ref": "../common.json#/properties/block_exploits"
},
"advanced_config": {
"type": "string"
"type": "string",
"example": ""
},
"meta": {
"type": "object"
"type": "object",
"example": {
"nginx_online": true,
"nginx_err": null
}
},
"allow_websocket_upgrade": {
"description": "Allow Websocket Upgrade for all paths",
"example": true,
"type": "boolean"
"type": "boolean",
"example": true
},
"http2_support": {
"$ref": "../common.json#/properties/http2_support"
},
"forward_scheme": {
"type": "string",
"enum": ["http", "https"]
"enum": ["http", "https"],
"example": "http"
},
"enabled": {
"$ref": "../common.json#/properties/enabled"
@@ -118,7 +125,15 @@
"type": "string"
}
}
}
},
"example": [
{
"path": "/app",
"forward_scheme": "http",
"forward_host": "example.com",
"forward_port": 80
}
]
},
"hsts_enabled": {
"$ref": "../common.json#/properties/hsts_enabled"
@@ -129,12 +144,14 @@
"certificate": {
"oneOf": [
{
"type": "null"
"type": "null",
"example": null
},
{
"$ref": "./certificate-object.json"
}
]
],
"example": null
},
"owner": {
"$ref": "./user-object.json"
@@ -142,12 +159,14 @@
"access_list": {
"oneOf": [
{
"type": "null"
"type": "null",
"example": null
},
{
"$ref": "./access-list-object.json"
}
]
],
"example": null
}
}
}