diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-02-14 11:06:20 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-02-14 11:06:20 +0100 |
commit | 136859ca6da6350853040b01f9a4bb3af09689df (patch) | |
tree | cd019ded44a6538cc53f7354579fea65c41d6f84 /src/hydrilla | |
parent | edbed9ce6912de60ab9b4f92c0d9d0a2c205136e (diff) | |
download | hydrilla-builder-136859ca6da6350853040b01f9a4bb3af09689df.tar.gz hydrilla-builder-136859ca6da6350853040b01f9a4bb3af09689df.zip |
specify full schema URL in instances
Diffstat (limited to 'src/hydrilla')
-rw-r--r-- | src/hydrilla/builder/build.py | 8 | ||||
m--------- | src/hydrilla/schemas | 0 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/hydrilla/builder/build.py b/src/hydrilla/builder/build.py index 8e10776..58fe1b2 100644 --- a/src/hydrilla/builder/build.py +++ b/src/hydrilla/builder/build.py @@ -43,6 +43,8 @@ _ = util.translation(here / 'locales').gettext index_validator = util.validator_for('package_source-1.schema.json') +schemas_root = 'https://hydrilla.koszko.org/schemas' + generated_by = { 'name': 'hydrilla.builder', 'version': _version.version @@ -284,7 +286,7 @@ class Build: new_item_obj.update([(p, item_def[p]) for p in copy_props]) new_item_obj['version'] = util.normalize_version(item_def['version']) - new_item_obj['api_schema_version'] = [1] + new_item_obj['$schema'] = f'{schemas_root}/api_{item_def["type"]}_description-1.schema.json' new_item_obj['source_copyright'] = self.copyright_file_refs new_item_obj['source_name'] = self.source_name new_item_obj['generated_by'] = generated_by @@ -303,6 +305,8 @@ class Build: """ index_validator.validate(index_obj) + schema = f'{schemas_root}/api_source_description-1.schema.json' + self.source_name = index_obj['source_name'] generate_spdx = index_obj.get('reuse_generate_spdx_report', False) @@ -334,7 +338,7 @@ class Build: } self.source_description = { - 'api_schema_version': [1], + '$schema': schema, 'source_name': self.source_name, 'source_copyright': self.copyright_file_refs, 'upstream_url': index_obj['upstream_url'], diff --git a/src/hydrilla/schemas b/src/hydrilla/schemas -Subproject b19171081e23bcccf9b41588c0464ca9c2c657c +Subproject 1d1c93d5a9011ecdf58a4952afcb5a1faff30e7 |