Skip to content

Instantly share code, notes, and snippets.

@d3dave
Created April 20, 2023 21:24
Show Gist options
  • Select an option

  • Save d3dave/0ad4e97cc6ab3cc8935c12cb3b2ae6a5 to your computer and use it in GitHub Desktop.

Select an option

Save d3dave/0ad4e97cc6ab3cc8935c12cb3b2ae6a5 to your computer and use it in GitHub Desktop.
Diff jsonschema
#!/bin/sh
pip3 install dollar-ref deepdiff
dref -i $1 $1.dref.json
jq .patternProperties $1.dref.json > $1.props.json
dref -i $2 $2.dref.json
jq .patternProperties $2.dref.json > $2.props.json
deep diff $1.props.json $2.props.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment