Revision 2938a9d1
Added by koszko over 1 year ago
src/hydrilla/builder/build.py | ||
---|---|---|
290 | 290 |
new_item_obj.update([(p, item_def[p]) for p in copy_props]) |
291 | 291 |
|
292 | 292 |
new_item_obj['version'] = util.normalize_version(item_def['version']) |
293 |
new_item_obj['$schema'] = f'{schemas_root}/api_{item_def["type"]}_description-1.0.1.schema.json'
|
|
293 |
new_item_obj['$schema'] = f'{schemas_root}/api_{item_def["type"]}_description-1.schema.json' |
|
294 | 294 |
new_item_obj['source_copyright'] = self.copyright_file_refs |
295 | 295 |
new_item_obj['source_name'] = self.source_name |
296 | 296 |
new_item_obj['generated_by'] = generated_by |
... | ... | |
309 | 309 |
""" |
310 | 310 |
index_validator.validate(index_obj) |
311 | 311 |
|
312 |
schema = f'{schemas_root}/api_source_description-1.0.1.schema.json'
|
|
312 |
schema = f'{schemas_root}/api_source_description-1.schema.json' |
|
313 | 313 |
|
314 | 314 |
self.source_name = index_obj['source_name'] |
315 | 315 |
|
src/test/test_hydrilla_builder.py | ||
---|---|---|
65 | 65 |
self.contents = default_contents.copy() |
66 | 66 |
|
67 | 67 |
self.expected_resources = [{ |
68 |
'$schema': 'https://hydrilla.koszko.org/schemas/api_resource_description-1.0.1.schema.json',
|
|
68 |
'$schema': 'https://hydrilla.koszko.org/schemas/api_resource_description-1.schema.json', |
|
69 | 69 |
'source_name': 'hello', |
70 | 70 |
'source_copyright': [{ |
71 | 71 |
'file': 'report.spdx', |
... | ... | |
91 | 91 |
}], |
92 | 92 |
'generated_by': expected_generated_by |
93 | 93 |
}, { |
94 |
'$schema': 'https://hydrilla.koszko.org/schemas/api_resource_description-1.0.1.schema.json',
|
|
94 |
'$schema': 'https://hydrilla.koszko.org/schemas/api_resource_description-1.schema.json', |
|
95 | 95 |
'source_name': 'hello', |
96 | 96 |
'source_copyright': [{ |
97 | 97 |
'file': 'report.spdx', |
... | ... | |
115 | 115 |
'generated_by': expected_generated_by |
116 | 116 |
}] |
117 | 117 |
self.expected_mapping = { |
118 |
'$schema': 'https://hydrilla.koszko.org/schemas/api_mapping_description-1.0.1.schema.json',
|
|
118 |
'$schema': 'https://hydrilla.koszko.org/schemas/api_mapping_description-1.schema.json', |
|
119 | 119 |
'source_name': 'hello', |
120 | 120 |
'source_copyright': [{ |
121 | 121 |
'file': 'report.spdx', |
... | ... | |
141 | 141 |
'generated_by': expected_generated_by |
142 | 142 |
} |
143 | 143 |
self.expected_source_description = { |
144 |
'$schema': 'https://hydrilla.koszko.org/schemas/api_source_description-1.0.1.schema.json',
|
|
144 |
'$schema': 'https://hydrilla.koszko.org/schemas/api_source_description-1.schema.json', |
|
145 | 145 |
'source_name': 'hello', |
146 | 146 |
'source_copyright': [{ |
147 | 147 |
'file': 'report.spdx', |
Also available in: Unified diff
don't include schema patch version number in generated instances