aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-03-01 09:54:30 +0100
committerWojtek Kosior <koszko@koszko.org>2022-03-01 09:54:30 +0100
commit2a7dc95e7b56677725c638399a2d772ab0236190 (patch)
treefc9f584c111d1e8c11f44d8003eb70aa12c338d4
parentc2a56443bdff9aa2d31ef8a901f7d4d3aa819ddb (diff)
downloadhaketilo-hydrilla-2a7dc95e7b56677725c638399a2d772ab0236190.tar.gz
haketilo-hydrilla-2a7dc95e7b56677725c638399a2d772ab0236190.zip
update schema versions to 1.0.1
-rw-r--r--setup.cfg2
-rw-r--r--src/hydrilla/server/serve.py4
-rw-r--r--src/test/test_server.py12
3 files changed, 9 insertions, 9 deletions
diff --git a/setup.cfg b/setup.cfg
index ad3c959..34ee67a 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -35,7 +35,7 @@ packages = find:
include_package_data=True
python_requires = >= 3.7
install_requires =
- hydrilla.builder==1.0b1
+ hydrilla.builder==1.0b2.dev1+g9271ca7
flask
jsonschema>=3.0
diff --git a/src/hydrilla/server/serve.py b/src/hydrilla/server/serve.py
index 9a75483..d0b1ab6 100644
--- a/src/hydrilla/server/serve.py
+++ b/src/hydrilla/server/serve.py
@@ -335,7 +335,7 @@ class Malcontent:
with open(ver_file, 'rt') as file_handle:
item_json = json.load(file_handle)
- util.validator_for(f'api_{item_type}_description-1.schema.json')\
+ util.validator_for(f'api_{item_type}_description-1.0.1.schema.json')\
.validate(item_json)
if item_type == 'resource':
@@ -549,7 +549,7 @@ def query():
mapping_refs = [i.as_query_result() for i in malcontent().query(url)]
result = {
- '$schema': 'https://hydrilla.koszko.org/schemas/api_query_result-1.schema.json',
+ '$schema': 'https://hydrilla.koszko.org/schemas/api_query_result-1.0.1.schema.json',
'mappings': mapping_refs,
'generated_by': generated_by
}
diff --git a/src/test/test_server.py b/src/test/test_server.py
index 4a6ade3..3107cfb 100644
--- a/src/test/test_server.py
+++ b/src/test/test_server.py
@@ -167,7 +167,7 @@ def test_get_newest(setup: Setup, item_type: str) -> None:
assert ('uuid' in definition) == (setup is not uuidless_setup)
- hydrilla_util.validator_for(f'api_{item_type}_description-1.schema.json')\
+ hydrilla_util.validator_for(f'api_{item_type}_description-1.0.1.schema.json')\
.validate(definition)
@pytest.mark.parametrize('item_type', ['resource', 'mapping'])
@@ -210,12 +210,12 @@ def test_empty_query() -> None:
response_object = json.loads(response.data.decode())
assert response_object == {
- '$schema': 'https://hydrilla.koszko.org/schemas/api_query_result-1.schema.json',
+ '$schema': 'https://hydrilla.koszko.org/schemas/api_query_result-1.0.1.schema.json',
'mappings': [],
'generated_by': expected_generated_by
}
- hydrilla_util.validator_for('api_query_result-1.schema.json')\
+ hydrilla_util.validator_for('api_query_result-1.0.1.schema.json')\
.validate(response_object)
def test_query() -> None:
@@ -229,7 +229,7 @@ def test_query() -> None:
response_object = json.loads(response.data.decode())
assert response_object == {
- '$schema': 'https://hydrilla.koszko.org/schemas/api_query_result-1.schema.json',
+ '$schema': 'https://hydrilla.koszko.org/schemas/api_query_result-1.0.1.schema.json',
'mappings': [{
'identifier': 'helloapple',
'long_name': 'Hello Apple',
@@ -238,7 +238,7 @@ def test_query() -> None:
'generated_by': expected_generated_by
}
- hydrilla_util.validator_for('api_query_result-1.schema.json')\
+ hydrilla_util.validator_for('api_query_result-1.0.1.schema.json')\
.validate(response_object)
def test_source() -> None:
@@ -256,7 +256,7 @@ def test_source() -> None:
response = def_get(f'/source/hello.zip')
assert sha256(response.data).digest().hex() == zipfile_hash
- hydrilla_util.validator_for('api_source_description-1.schema.json')\
+ hydrilla_util.validator_for('api_source_description-1.0.1.schema.json')\
.validate(description)
def test_missing_source() -> None: