Skip to content

Commit 0dd68d5

Browse files
committed
json schema refactoring
1 parent a85a137 commit 0dd68d5

File tree

9 files changed

+289
-321
lines changed

9 files changed

+289
-321
lines changed

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "hat-json"
3-
version = "0.5.29"
3+
version = "0.6.0"
44
description = "Hat JSON library"
55
readme = "README.rst"
66
requires-python = ">=3.10"
@@ -28,6 +28,9 @@ Repository = "https://github.com/hat-open/hat-json.git"
2828
Documentation = "http://hat-json.hat-open.com"
2929

3030
[project.optional-dependencies]
31+
rs = [
32+
"jsonschema_rs ~=0.28.1",
33+
]
3134
dev = [
3235
"hat-doit ~=0.15.18",
3336
"sphinxcontrib-programoutput >=0.17",

requirements.pip.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ hat-doit ~=0.15.18
22
hat-util ~=0.6.17
33
jsonpatch ~=1.33
44
jsonschema ~=4.23.0
5+
jsonschema_rs ~=0.28.1
56
pyyaml ~=6.0.2
67
referencing ~=0.35.1
78
sphinxcontrib-programoutput >=0.17

src_py/hat/json/__init__.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@
2222
read_conf)
2323
from hat.json.patch import (diff,
2424
patch)
25-
from hat.json.repository import (SchemaRepository,
26-
json_schema_repo)
27-
from hat.json.validator import (Validator,
28-
DefaultValidator,
29-
JsonSchemaValidator)
25+
from hat.json.schema import (SchemaId,
26+
Schema,
27+
SchemaRepository,
28+
create_schema_repository,
29+
merge_schema_repositories,
30+
SchemaValidator,
31+
PySchemaValidator,
32+
RsSchemaValidator,
33+
DefaultSchemaValidator,
34+
json_schema_repo)
3035
from hat.json import vt
3136

3237

@@ -52,9 +57,14 @@
5257
'read_conf',
5358
'diff',
5459
'patch',
60+
'SchemaId',
61+
'Schema',
5562
'SchemaRepository',
63+
'create_schema_repository',
64+
'merge_schema_repositories',
65+
'SchemaValidator',
66+
'PySchemaValidator',
67+
'RsSchemaValidator',
68+
'DefaultSchemaValidator',
5669
'json_schema_repo',
57-
'Validator',
58-
'DefaultValidator',
59-
'JsonSchemaValidator',
6070
'vt']

src_py/hat/json/repository.py

Lines changed: 0 additions & 189 deletions
This file was deleted.

0 commit comments

Comments
 (0)