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": "createStream",
"summary": "Create a Stream",
"tags": ["Streams"],
"tags": ["streams"],
"security": [
{
"BearerAuth": ["streams"]
"bearerAuth": [
"streams.manage"
]
}
],
"requestBody": {
@@ -15,7 +17,11 @@
"schema": {
"type": "object",
"additionalProperties": false,
"required": ["incoming_port", "forwarding_host", "forwarding_port"],
"required": [
"incoming_port",
"forwarding_host",
"forwarding_port"
],
"properties": {
"incoming_port": {
"$ref": "../../../components/stream-object.json#/properties/incoming_port"
@@ -42,6 +48,15 @@
"$ref": "../../../components/dead-host-object.json#/properties/domain_names"
}
}
},
"example": {
"incoming_port": 8888,
"forwarding_host": "127.0.0.1",
"forwarding_port": 8080,
"tcp_forwarding": true,
"udp_forwarding": false,
"certificate_id": 0,
"meta": {}
}
}
}
@@ -72,13 +87,14 @@
"id": 1,
"created_on": "2024-10-09T02:33:16.000Z",
"modified_on": "2024-10-09T02:33:16.000Z",
"is_deleted": false,
"is_disabled": false,
"email": "admin@example.com",
"name": "Administrator",
"nickname": "Admin",
"avatar": "",
"roles": ["admin"]
"roles": [
"admin"
]
},
"certificate_id": 0
}