From 03e2eca4b3666719ec0c59c3f16e55d4c8ed123e Mon Sep 17 00:00:00 2001 From: Satr14 <90962949+SX-9@users.noreply.github.com> Date: Fri, 25 Oct 2024 22:19:02 +0700 Subject: [PATCH 1/5] schema update --- schema.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/schema.json b/schema.json index e553c41..a33e938 100644 --- a/schema.json +++ b/schema.json @@ -1,4 +1,5 @@ { + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "description": { @@ -11,7 +12,10 @@ "type": "string" } }, - "required": ["username"] + "required": ["username"], + "additionalProperties": { + "type": "string" + } }, "record": { "type": "object", @@ -67,6 +71,7 @@ } } }, + "required": [], "anyOf": [ { "required": ["A"] }, { "required": ["AAAA"] }, From 4c2baa79cd1ce02b20721acbe3f3739ef4d8852c Mon Sep 17 00:00:00 2001 From: Satr14 <90962949+SX-9@users.noreply.github.com> Date: Fri, 25 Oct 2024 22:21:09 +0700 Subject: [PATCH 2/5] update validation --- .github/workflows/validation.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 577704e..2eaf9a8 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -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' From 9cc9c0cb21fb8ff3a36c70629723316a8ba83ab0 Mon Sep 17 00:00:00 2001 From: Satr14 <90962949+SX-9@users.noreply.github.com> Date: Fri, 25 Oct 2024 22:25:02 +0700 Subject: [PATCH 3/5] update record not required --- schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema.json b/schema.json index a33e938..c44c459 100644 --- a/schema.json +++ b/schema.json @@ -85,5 +85,5 @@ "type": "boolean" } }, - "required": ["owner", "record", "proxied"] + "required": ["owner", "record"] } From e8a7958d0b590646ca1c6546f03eefa11995b42b Mon Sep 17 00:00:00 2001 From: Satr14 <90962949+SX-9@users.noreply.github.com> Date: Fri, 25 Oct 2024 22:28:00 +0700 Subject: [PATCH 4/5] add alias record for @ subdomain --- schema.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/schema.json b/schema.json index c44c459..aee4936 100644 --- a/schema.json +++ b/schema.json @@ -20,6 +20,9 @@ "record": { "type": "object", "properties": { + "ALIAS": { + "type": "string" + }, "A": { "type": "array", "items": { From 44942d26039c0d94d2bd6dcbee89836b090d44b0 Mon Sep 17 00:00:00 2001 From: Satr14 <90962949+SX-9@users.noreply.github.com> Date: Fri, 25 Oct 2024 22:30:21 +0700 Subject: [PATCH 5/5] ass alias to anyof --- schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/schema.json b/schema.json index aee4936..b5166a5 100644 --- a/schema.json +++ b/schema.json @@ -76,6 +76,7 @@ }, "required": [], "anyOf": [ + { "required": ["ALIAS"] }, { "required": ["A"] }, { "required": ["AAAA"] }, { "required": ["CNAME"] },