python-jsonschema-specifications: Add new package

From the README:

JSON support files from the JSON Schema Specifications (metaschemas,
vocabularies, etc.), packaged for runtime access from Python as a
referencing-based Schema Registry.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To
2023-10-14 02:30:53 +08:00
committed by Tianling Shen
parent 728aac31bb
commit ebb69c5c17
2 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
#!/bin/sh
[ "$1" = python3-jsonschema-specifications ] || exit 0
python3 - << 'EOF'
from jsonschema_specifications import REGISTRY as SPECIFICATIONS
DRAFT202012_DIALECT_URI = "https://json-schema.org/draft/2020-12/schema"
assert SPECIFICATIONS.contents(DRAFT202012_DIALECT_URI) != ""
EOF