Whole file

pglass/py-openapi-schema-to-json-schema

The author described this change as Fix duplicate references within a schema. It counts as a record because the check below fails on the code as it stood at 8a0aba50d and passes on 6bf322452, with nothing else changed between the two runs.

Fix saved2018-07-06
Sharing licenceMIT · LICENSE
Change size+2 2

What the code was meant to do, written into the code itself as a save note

Fix duplicate references within a schema

The change

1-import copy
1+import json
22
33
44 class InvalidTypeError(ValueError):
4141 )
4242
4343 if options['cloneSchema']:
44- schema = copy.deepcopy(schema)
44+ schema = json.loads(json.dumps(schema))
4545
4646 schema = convertSchema(schema, options)
4747 schema['$schema'] = 'http://json-schema.org/draft-04/schema#'

The check that tells the two apart

failpass·tests/to_jsonschema/test_clone_schema.py::test_clone_schema_with_duplicate_references

Check file tests/to_jsonschema/test_clone_schema.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it8a0aba50db69c8c1e541685822379cf4e18e8c92
Broken version dated2018-06-23
Moduleopenapi_schema_to_json_schema.to_jsonschema
Units changedconvert
Fingerprint05888b8adced0528
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.