summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAleš Mrázek <ales.mrazek@nic.cz>2024-09-07 02:09:40 +0200
committerAleš Mrázek <ales.mrazek@nic.cz>2024-09-09 14:28:32 +0200
commita7451c9ebf84913dc55c618fc7e68362ff240c7b (patch)
treed43fa75f916618da32547f48af31953780a87949 /scripts
parenttests: JSON schema packaging tests (diff)
downloadknot-resolver-a7451c9ebf84913dc55c618fc7e68362ff240c7b.tar.xz
knot-resolver-a7451c9ebf84913dc55c618fc7e68362ff240c7b.zip
doc: create static JSON schema
- poe check: check for difference in JSON schema - scripts/meson/make-doc.sh: do not create JSON schema
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/meson/make-doc.sh5
-rwxr-xr-xscripts/poe-tasks/check6
2 files changed, 7 insertions, 4 deletions
diff --git a/scripts/meson/make-doc.sh b/scripts/meson/make-doc.sh
index 787b8a37..1bea3df9 100755
--- a/scripts/meson/make-doc.sh
+++ b/scripts/meson/make-doc.sh
@@ -3,10 +3,7 @@
set -o errexit -o nounset
cd "$(dirname "${0}")/../.."
-# generate JSON schema for the manager's declarative config
-## the following python command should hopefully run without any dependencies except for standard python
-mkdir -p doc/_static/
-python3 -m python.knot_resolver.client schema > doc/_static/config.schema.json
+# convert JSON schema to html
generate-schema-doc --config expand_buttons=true doc/_static/config.schema.json doc/_static/schema_doc.html
# generating the user documentation
diff --git a/scripts/poe-tasks/check b/scripts/poe-tasks/check
index 7628b1fb..9cd529e9 100755
--- a/scripts/poe-tasks/check
+++ b/scripts/poe-tasks/check
@@ -68,6 +68,12 @@ python setup.py --help > /dev/null
check_rv $?
echo
+# check that doc/_static/config.schema.json is the latest
+echo -e "${yellow}Checking doc/_static/config.schema.json${reset}"
+python -m knot_resolver.client schema | diff - doc/_static/config.schema.json
+check_rv $?
+echo
+
# fancy messages at the end :)
if test "$aggregate_rv" -eq "0"; then
echo -e "${green}Everything looks great!${reset}"