Openapi Schema improvements

- Return proper booleans in api responses
- Update jsonschemavalidation to latest draft
This commit is contained in:
Jamie Curnow
2024-10-10 15:53:11 +10:00
parent dfe2588523
commit 4572b205c9
69 changed files with 862 additions and 2082 deletions

View File

@ -30,19 +30,19 @@
"additionalProperties": false,
"properties": {
"id": {
"$ref": "../common.json#/definitions/id"
"$ref": "../common.json#/properties/id"
},
"created_on": {
"$ref": "../common.json#/definitions/created_on"
"$ref": "../common.json#/properties/created_on"
},
"modified_on": {
"$ref": "../common.json#/definitions/modified_on"
"$ref": "../common.json#/properties/modified_on"
},
"owner_user_id": {
"$ref": "../common.json#/definitions/user_id"
"$ref": "../common.json#/properties/user_id"
},
"domain_names": {
"$ref": "../common.json#/definitions/domain_names"
"$ref": "../common.json#/properties/domain_names"
},
"forward_host": {
"type": "string",
@ -55,19 +55,19 @@
"maximum": 65535
},
"access_list_id": {
"$ref": "../common.json#/definitions/access_list_id"
"$ref": "../common.json#/properties/access_list_id"
},
"certificate_id": {
"$ref": "../common.json#/definitions/certificate_id"
"$ref": "../common.json#/properties/certificate_id"
},
"ssl_forced": {
"$ref": "../common.json#/definitions/ssl_forced"
"$ref": "../common.json#/properties/ssl_forced"
},
"caching_enabled": {
"$ref": "../common.json#/definitions/caching_enabled"
"$ref": "../common.json#/properties/caching_enabled"
},
"block_exploits": {
"$ref": "../common.json#/definitions/block_exploits"
"$ref": "../common.json#/properties/block_exploits"
},
"advanced_config": {
"type": "string"
@ -81,14 +81,14 @@
"type": "boolean"
},
"http2_support": {
"$ref": "../common.json#/definitions/http2_support"
"$ref": "../common.json#/properties/http2_support"
},
"forward_scheme": {
"type": "string",
"enum": ["http", "https"]
},
"enabled": {
"$ref": "../common.json#/definitions/enabled"
"$ref": "../common.json#/properties/enabled"
},
"locations": {
"type": "array",
@ -124,19 +124,33 @@
}
},
"hsts_enabled": {
"$ref": "../common.json#/definitions/hsts_enabled"
"$ref": "../common.json#/properties/hsts_enabled"
},
"hsts_subdomains": {
"$ref": "../common.json#/definitions/hsts_subdomains"
"$ref": "../common.json#/properties/hsts_subdomains"
},
"certificate": {
"$ref": "./certificate-object.json"
"oneOf": [
{
"type": "null"
},
{
"$ref": "./certificate-object.json"
}
]
},
"owner": {
"$ref": "./user-object.json"
},
"access_list": {
"$ref": "./access-list-object.json"
"oneOf": [
{
"type": "null"
},
{
"$ref": "./access-list-object.json"
}
]
},
"use_default_location": {
"type": "boolean"