Mercurial > hg > piper
view json/check.sh @ 192:0898ffd47a10
Update examples for configuration request, load response, and rpc
response - I had overlooked these because their contained objects were
being validated against out-of-date online copies of schema
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Fri, 03 Feb 2017 15:58:21 +0000 |
parents | 549d3d44d729 |
children |
line wrap: on
line source
#!/bin/bash mydir=$(dirname "$0") set -eu echo for ex in "$mydir"/examples/*.json ; do echo "Checking $ex..." 1>&2 jsonschema -i "$ex" "$mydir"/schema/$(basename "$ex" | sed 's/-[^.]*//') done for s in "$mydir"/schema/*.json ; do if [ ! -f "$mydir"/examples/$(basename "$s") ]; then if ! ls -1 "$mydir"/examples/$(basename "$s" .json)-*.json >/dev/null 2>&1; then echo "WARNING: No example file for schema $s" fi fi done echo OK