Skip to content

Commit

Permalink
Update validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando-A-Rocha committed Jan 18, 2025
1 parent 96e9548 commit e2de548
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion schemas/article.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion schemas/structure.yaml → schemas/navigation.yaml
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
7 changes: 7 additions & 0 deletions tools/validate.cmd
Original file line number Diff line number Diff line change
@@ -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"
)
2 changes: 1 addition & 1 deletion tools/validate.sh
Original file line number Diff line number Diff line change
@@ -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 {}
Expand Down
File renamed without changes.

0 comments on commit e2de548

Please sign in to comment.