Skip to content

Commit c43615c

Browse files
committed
npm script for building schemas locally
1 parent 9d4f648 commit c43615c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"license": "Apache-2.0",
1515
"scripts": {
1616
"build": "bash ./scripts/md2html/build.sh",
17+
"build-schemas": "bash ./scripts/schema-publish.sh",
1718
"build-src": "npm run validate-markdown && bash ./scripts/md2html/build-src.sh",
1819
"test": "c8 --100 vitest --watch=false && bash scripts/schema-test-coverage.sh",
1920
"validate-markdown": "npx mdv src/oas.md && npx markdownlint-cli src/oas.md"

scripts/schema-publish.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
schemaDir="src/schemas/validation"
88
branch=$(git branch --show-current)
99
version=${branch:1:3}
10-
echo $version
10+
echo === Building schemas into ./deploy/oas/$version
1111

1212
# list of schemas to process, dependent schemas come first
1313
schemas=(meta.yaml dialect.yaml schema.yaml schema-base.yaml)
@@ -49,3 +49,5 @@ for schema in "${!datesHash[@]}"; do
4949

5050
mv deploy/oas/$version/$base/*.md $target.md
5151
done
52+
53+
echo === Built

0 commit comments

Comments
 (0)