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$"
|
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/*"
|
|
||||||
|
|
|
||||||
13
schema.json
13
schema.json
|
|
@ -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"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue