Skip to content
Snippets Groups Projects
Commit 84d64f6d authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-745: only inject in actual schema's

parent 8cc2202f
No related branches found
No related tags found
4 merge requests!634WIP: COBALT commissioning delta,!512From master into TMSS-849-Commissioning-sprint-9,!504TMSS-745: Responsive Telescope,!481Draft: SW-971 SW-973 SW-975: Various fixes to build LOFAR correctly.
......@@ -66,9 +66,6 @@ def populate_schemas(schema_dir: str=None, templates_filename: str=None):
# override plain-text type by its url
template['type'] = client.get_full_url_for_path('task_type/' + template.get('type'))
# inject a unique id in the form of a unique URL to this schema
json_schema['$id'] = client.get_full_url_for_path('schemas/%s/%s/%s' % (template_name.replace('_', ''), template['name'], template['version']))
# make sure that all urls point to the tmss base_url
json_schema = json_utils.replace_host_in_urls(json_schema, new_base_url=client.host_url)
......@@ -78,6 +75,8 @@ def populate_schemas(schema_dir: str=None, templates_filename: str=None):
if 'strategy_template' in template_name:
template['template'] = json_schema
else:
# inject a unique id in the form of a unique URL to this schema
json_schema['$id'] = client.get_full_url_for_path('schemas/%s/%s/%s' % (template_name.replace('_', ''), template['name'], template['version']))
template['schema'] = json_schema
# what are the references? on which other schema's does this schema depend?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment