diff --git a/schemas/article.yaml b/schemas/article.yaml index 264ae62..68edfa8 100644 --- a/schemas/article.yaml +++ b/schemas/article.yaml @@ -1,5 +1,5 @@ $schema: "https://json-schema.org/draft/2020-12/schema" -$id: "/schemas/structure" +$id: "/schemas/navigation" title: "Wiki Article Schema" type: "object" required: diff --git a/schemas/structure.yaml b/schemas/navigation.yaml similarity index 96% rename from schemas/structure.yaml rename to schemas/navigation.yaml index 0ec284c..c0fdeca 100644 --- a/schemas/structure.yaml +++ b/schemas/navigation.yaml @@ -1,5 +1,5 @@ $schema: "https://json-schema.org/draft/2020-12/schema" -$id: "/schemas/structure" +$id: "/schemas/navigation" title: "Wiki Navigation Schema" type: "object" diff --git a/tools/validate.cmd b/tools/validate.cmd index 3eea1b3..0993e20 100644 --- a/tools/validate.cmd +++ b/tools/validate.cmd @@ -1,5 +1,12 @@ @echo off +.\tools\yajsv.exe -s schemas/navigation.yaml "wiki/navigation.yaml" +.\tools\yajsv.exe -s schemas/categories.yaml "wiki/categories.yaml" + for /r "functions" %%f in (*.yaml) do ( .\tools\yajsv.exe -s schemas/function.yaml "%%f" ) + +for /r "articles" %%f in (*.yaml) do ( + .\tools\yajsv.exe -s schemas/article.yaml "%%f" +) diff --git a/tools/validate.sh b/tools/validate.sh index b2497c3..a6cb593 100644 --- a/tools/validate.sh +++ b/tools/validate.sh @@ -1,6 +1,6 @@ #!/bin/bash -tools/yajsv -s schemas/structure.yaml wiki/structure.yaml +tools/yajsv -s schemas/navigation.yaml wiki/navigation.yaml tools/yajsv -s schemas/categories.yaml wiki/categories.yaml find 'functions/' -name '*.yaml' -type f -print0 | xargs -0 -I {} tools/yajsv -s schemas/function.yaml {} diff --git a/wiki/structure.yaml b/wiki/navigation.yaml similarity index 100% rename from wiki/structure.yaml rename to wiki/navigation.yaml