schema validation active

schema update
This commit is contained in:
Satr14 2024-10-25 22:31:40 +07:00 committed by GitHub
commit eb83a0b7c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 8 deletions

View file

@ -36,9 +36,8 @@ jobs:
pattern: "\\.json$" pattern: "\\.json$"
env: env:
BASE: "domains/" BASE: "domains/"
# NOTE: wait for wildcard support - name: Validate action.yml against a remote schema
# - name: Validate JSON Schema uses: cardinalby/schema-validator-action@v3
# uses: docker://orrosenblatt/validate-json-action:latest with:
# env: file: 'domains/*.json'
# INPUT_SCHEMA: "schema.json" schema: 'schema.json'
# INPUT_JSONS: "domains/*"

View file

@ -1,4 +1,5 @@
{ {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object", "type": "object",
"properties": { "properties": {
"description": { "description": {
@ -11,11 +12,17 @@
"type": "string" "type": "string"
} }
}, },
"required": ["username"] "required": ["username"],
"additionalProperties": {
"type": "string"
}
}, },
"record": { "record": {
"type": "object", "type": "object",
"properties": { "properties": {
"ALIAS": {
"type": "string"
},
"A": { "A": {
"type": "array", "type": "array",
"items": { "items": {
@ -67,7 +74,9 @@
} }
} }
}, },
"required": [],
"anyOf": [ "anyOf": [
{ "required": ["ALIAS"] },
{ "required": ["A"] }, { "required": ["A"] },
{ "required": ["AAAA"] }, { "required": ["AAAA"] },
{ "required": ["CNAME"] }, { "required": ["CNAME"] },
@ -80,5 +89,5 @@
"type": "boolean" "type": "boolean"
} }
}, },
"required": ["owner", "record", "proxied"] "required": ["owner", "record"]
} }