Skip to content

Commit

Permalink
Add validation script
Browse files Browse the repository at this point in the history
  • Loading branch information
drdavella committed Mar 7, 2024
1 parent 46691ad commit 01ddb81
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
click~=8.0.0
jsonschema~=4.21.0
17 changes: 17 additions & 0 deletions scripts/validate_schema.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env python3
import json

import click
import jsonschema


@click.command()
@click.argument('schema_file', type=click.File('r'))
def validate_schema(schema_file):
schema = json.load(schema_file)
jsonschema.Draft202012Validator.check_schema(schema)
print('✅ Schema is valid')


if __name__ == '__main__':
validate_schema()

0 comments on commit 01ddb81

Please sign in to comment.