Commit ec578ff9 authored by Mark Canterbury's avatar Mark Canterbury Committed by Mark Canterbury
Browse files

Adding $schema keyword to translation, as well as newline

parent 5f34be9b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
{
  "$id": "ts_103280_2017_07",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "ShortString": {
      "type": "string",
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ mappings = [
def translate_schema (schema_path: str, ns_to_id_map: dict, schema_locations = []):
    js = {
        "$id" : "?",
        "$schema" : "https://json-schema.org/draft/2020-12/schema",
        "$defs" : {}
    }

+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ if __name__ == "__main__":
                ]
            }

        json_string = json.dumps(js, indent=2)
        json_string = json.dumps(js, indent=2) + "\n"

        if "Core" in schema_tuple[1]:
            json_string = json_string.replace('"$ref": "#/$defs/HI1Object"', '"$ref": "#/$defs/ConcreteHI1Object"')