Skip to content

Commit

Permalink
schema validation active
Browse files Browse the repository at this point in the history
schema update
  • Loading branch information
SX-9 authored Oct 25, 2024
2 parents f7e46d4 + 44942d2 commit eb83a0b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 11 additions & 2 deletions schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"description": {
Expand All @@ -11,11 +12,17 @@
"type": "string"
}
},
"required": ["username"]
"required": ["username"],
"additionalProperties": {
"type": "string"
}
},
"record": {
"type": "object",
"properties": {
"ALIAS": {
"type": "string"
},
"A": {
"type": "array",
"items": {
Expand Down Expand Up @@ -67,7 +74,9 @@
}
}
},
"required": [],
"anyOf": [
{ "required": ["ALIAS"] },
{ "required": ["A"] },
{ "required": ["AAAA"] },
{ "required": ["CNAME"] },
Expand All @@ -80,5 +89,5 @@
"type": "boolean"
}
},
"required": ["owner", "record", "proxied"]
"required": ["owner", "record"]
}

0 comments on commit eb83a0b

Please sign in to comment.