Whole file

keleshev/schema

The author described this change as fix: JSON Schema missing title in subschemas. It counts as a record because the check below fails on the code as it stood at c3aea9068 and passes on 481f2ee0b, with nothing else changed between the two runs.

Fix saved2025-02-27
Sharing licenceMIT · LICENSE-MIT
Change size+3 0

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

fix: JSON Schema missing title in subschemas

The change

671671
672672 return_schema["$ref"] = "#/definitions/" + cast(str, schema.name)
673673 else:
674+ if schema.name and not title:
675+ return_schema["title"] = schema.name
676+
674677 if flavor == TYPE:
675678 # Handle type
676679 return_schema["type"] = _get_type_name(s)

The check that tells the two apart

failpass·test_schema.py::test_json_schema_title_in_or

Check file test_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 itc3aea90689f7adbc14f6eec8a39bc653d3f7ae41
Broken version dated2025-02-24
Moduleschema.__init__
Units changedSchema
Fingerprint7c98b5e6009b2c45
Checked2026-08-18 by goldset/0.1

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

Other bugs found in keleshev/schema