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,35 +1,14 @@
{
"operationId": "validateCertificates",
"summary": "Validates given Custom Certificates",
"tags": ["Certificates"],
"tags": ["certificates"],
"security": [
{
"BearerAuth": ["certificates"]
"bearerAuth": ["certificates.manage"]
}
],
"requestBody": {
"description": "Certificate Files",
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": ["certificate", "certificate_key"],
"properties": {
"certificate": {
"type": "string"
},
"certificate_key": {
"type": "string"
},
"intermediate_certificate": {
"type": "string"
}
}
}
}
}
"$ref": "../../../../common.json#/properties/certificate_files"
},
"responses": {
"200": {
@@ -62,10 +41,12 @@
"required": ["cn", "issuer", "dates"],
"properties": {
"cn": {
"type": "string"
"type": "string",
"example": "example.com"
},
"issuer": {
"type": "string"
"type": "string",
"example": "C = US, O = Let's Encrypt, CN = E5"
},
"dates": {
"type": "object",
@@ -78,12 +59,17 @@
"to": {
"type": "integer"
}
},
"example": {
"from": 1728448218,
"to": 1736224217
}
}
}
},
"certificate_key": {
"type": "boolean"
"type": "boolean",
"example": true
}
}
}