File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -681,6 +681,7 @@ def main(metadata_path, json_schema_path):
681681 metadata_path (str, pathlib.Path): 4C emitted metadata file path
682682 json_schema_path (str, pathlib.Path): JSON schema file path
683683 """
684+ json_schema_path = Path (json_schema_path )
684685 metadata_4C , title_section , code_metadata = metadata_object_from_file (metadata_path )
685686 schema = get_schema (metadata_4C )
686687 schema ["properties" ].update (
@@ -691,6 +692,14 @@ def main(metadata_path, json_schema_path):
691692 }
692693 create_json_schema (schema , code_metadata ["commit_hash" ], json_schema_path )
693694
695+ # Create partial schema
696+ # Remove required section
697+ schema .pop ("required" )
698+ json_schema_partial_path = json_schema_path .parent / (
699+ json_schema_path .name + "_partial" + json_schema_path .suffix
700+ )
701+ create_json_schema (schema , code_metadata ["commit_hash" ], json_schema_partial_path )
702+
694703
695704if __name__ == "__main__" :
696705 parser = argparse .ArgumentParser (
You can’t perform that action at this time.
0 commit comments