Optional properties become required when their nested schemas contain required properties
A property omitted from its parent schema’s required list was emitted without a TypeScript optional marker when that property’s nested object had required children.
- Report
- Issue #1506
- Reporter
- nkincy
- Reported
- February 25, 2026
- Reported version
- Not specified
- Primary matched window
- Outside primary window
- First affected release entered primary window
- No
- Origin classification
- Pre-existing before 2026
- Classification confidence
- High
- Chronology confidence
- High
- Accepted correction
- PR #1507
- First fixed release
- 2.0.0
- Report to release
- 1 day
Finding
The responsible condition entered the generator in 2022 and is present in releases well before the 2025 boundary. No 2026 change created the behavior.
Evidence trail
Origin
Exact origin: 2af86557, committed September 10, 2022; first affected release 0.8.0. The schema encoder began deciding optionality from the child schema’s own required array instead of the parent object’s required list.
Source history and behavioral evidence
Rename-aware history traces the faulty required-property check to the 2022 schema-type encoder implementation. The fix changes that decision to use the parent object’s required list and adds the reporter’s nested-object shape as a test.
Release chronology
The origin commit is contained in 0.8.0; the accepted fix shipped in 2.0.0 one day after the report.