mirror of
https://github.com/partofmyid/register.git
synced 2026-06-05 18:46:50 +07:00
schema validation active
schema update
This commit is contained in:
commit
eb83a0b7c9
2 changed files with 16 additions and 8 deletions
11
.github/workflows/validation.yml
vendored
11
.github/workflows/validation.yml
vendored
|
|
@ -36,9 +36,8 @@ jobs:
|
|||
pattern: "\\.json$"
|
||||
env:
|
||||
BASE: "domains/"
|
||||
# NOTE: wait for wildcard support
|
||||
# - name: Validate JSON Schema
|
||||
# uses: docker://orrosenblatt/validate-json-action:latest
|
||||
# env:
|
||||
# INPUT_SCHEMA: "schema.json"
|
||||
# INPUT_JSONS: "domains/*"
|
||||
- name: Validate action.yml against a remote schema
|
||||
uses: cardinalby/schema-validator-action@v3
|
||||
with:
|
||||
file: 'domains/*.json'
|
||||
schema: 'schema.json'
|
||||
|
|
|
|||
13
schema.json
13
schema.json
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
|
|
@ -11,11 +12,17 @@
|
|||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["username"]
|
||||
"required": ["username"],
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"record": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ALIAS": {
|
||||
"type": "string"
|
||||
},
|
||||
"A": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -67,7 +74,9 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
"anyOf": [
|
||||
{ "required": ["ALIAS"] },
|
||||
{ "required": ["A"] },
|
||||
{ "required": ["AAAA"] },
|
||||
{ "required": ["CNAME"] },
|
||||
|
|
@ -80,5 +89,5 @@
|
|||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": ["owner", "record", "proxied"]
|
||||
"required": ["owner", "record"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue