Skip to content

Update dependency json-schema-to-typescript to v16 - #2269

Merged
mergify[bot] merged 1 commit into
mainfrom
renovate/json-schema-to-typescript-16.x
Sep 4, 2026
Merged

Update dependency json-schema-to-typescript to v16#2269
mergify[bot] merged 1 commit into
mainfrom
renovate/json-schema-to-typescript-16.x

Conversation

@renovate

@renovate renovate Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
json-schema-to-typescript 15.0.416.0.0 age adoption passing confidence

Release Notes

bcherny/json-schema-to-typescript (json-schema-to-typescript)

v16.0.0

Compare Source

This release collects the fixes and small features merged since 15.0.4. Several of them correct types that were previously emitted wrong, so existing schemas may generate different output; hence the major version.

New:

  • e3c7776 Feat: Support OpenAPI 3.0 nullable: true, including next to a $ref; such schemas now emit T | null (#​755, fixes #​410)
  • ab31f41 Feat: Support draft-3 / Swagger 2 property-level required: true; such properties are now emitted as required (#​756, fixes #​440, #​6)
  • 111c187 Feat: Resolve draft-07 named-anchor $refs ("#name" matching a sibling $id: "#name") instead of crashing (#​744, fixes #​220)

May change emitted types for existing schemas:

  • efceb64 Bugfix: Multiple patternProperties (or patternProperties with additionalProperties: false) are folded into one index signature typed as the union of their value types, instead of being dropped (#​754, fixes #​160, #​315)
  • b84b3da Bugfix: allOf members made up only of unsupported keywords (eg. if/then, not) no longer add a stray {[k: string]: unknown} to the intersection (#​743, fixes #​369)
  • d8618e5 Bugfix: properties/patternProperties on a nested schema were dropped when combined with oneOf/anyOf/allOf; they are now intersected with the compound type (#​708, fixes #​630)
  • 4eee0f1 Bugfix: $refs to definitions with dotted names (eg. #/definitions/v1.ManagedFieldsEntry) were truncated at the first dot (V1); the full name is now used (V1ManagedFieldsEntry) (#​705, fixes #​645)
  • 7a3dd8e Bugfix: Nested arrays with minItems/maxItems are capped by the cumulative product of their bounds against maxItems, falling back to an unbounded array instead of hanging or emitting enormous tuple unions (#​703, fixes #​690)
  • 34a692c Bugfix: type: null (the JSON null value) is treated as type: "null" instead of as an untyped object (#​702, fixes #​667)
  • 0f9d309 Bugfix: unreachableDefinitions now declares definitions even when declareExternallyReferenced is off (#​706, fixes #​652)
  • 1900e1f Bugfix: With inferStringEnumKeysFromValues, a const is emitted as a literal type again rather than a single-member enum (#​701, fixes #​666)
  • 606e359 Bugfix: A schema with an array type and properties (eg. type: ['object', 'null']) at the root or as an untitled definition compiled to A & (A | null), making the non-object members unreachable; it now emits A | null (#​753, supersedes #​672)
  • c73ea75 Bugfix: An empty schema inside allOf (eg. allOf: [{$ref: '#/definitions/User'}, {}]) collapsed the whole intersection to unknown; the empty member is now dropped and User is kept (#​752, fixes #​654)
  • 9c50776 Bugfix: The description of an inline items schema is no longer dropped; it is added to the JSDoc of the array's declaration as an Items: ... paragraph (#​751, fixes #​660)

Fixes for crashes and output that did not compile:

  • b25c768 Bugfix: A root-level $ref to a definition that is itself only a $ref no longer crashes with "Refs should have been resolved by the resolver!" (#​741, fixes #​740)
  • b25c768 Bugfix: A root-level $ref to a definition that refers back to itself (directly or through items/properties) compiles instead of crashing with the same error (#​741, fixes #​132, #​730). The referenced definition is still emitted as its own interface alongside the root type
  • 107dd42 Bugfix: Index signatures from patternProperties/additionalProperties are widened to cover sibling named properties, so the interface typechecks (TS2411). Index signatures that already typechecked are emitted type-equivalent to before (#​704, fixes #​671)
  • a2234d3 Bugfix: inferStringEnumKeysFromValues no longer produces invalid enum members for non-string, empty or digit-leading values (#​694, fixes #​657)
  • 377c6a1 Bugfix: A named enum (tsEnumNames) in a position with no name no longer emits a nameless enum declaration; it degrades to a union of literals (#​693, fixes #​691)
  • c44faed Bugfix: Generated type names can no longer start with a digit or collapse to an empty name (#​698, fixes #​640)
  • 8d8a141 Bugfix: Recursive schemas that reach the generator without a name (a self-referencing $ref with a sibling keyword such as description, a recursive oneOf under components/schemas, an untitled recursive schema in another file) are given a generated type name instead of overflowing the stack. Schemas that compiled before are unchanged, except that an anonymous recursive union with a {}/true member now keeps its alias (same type, one extra export type) (#​760, fixes #​482, #​614)

Other:

  • bf06bbb Bugfix (CLI): Piping a schema on stdin no longer prints a DEP0187 deprecation warning on Node 24 (#​750)
  • 3abde40 Perf: compile() no longer scans every definition once per parsed node; schemas with thousands of definitions compile much faster (schemastore's CloudFormation schema: ~54 s -> ~3 s). Generated output is unchanged (#​759)
  • b88891c Perf: Formatting large, mostly quote-free outputs is several times faster (prettier is told the output is a .d.ts, so it skips its JSX-detection scan); a caller's own style.filepath still wins. Generated output is unchanged (#​758)
  • 16c2e77 Bugfix (CLI): relative $refs are resolved against each schema file's own directory rather than process.cwd(), so a schema passed by path from another directory finds its siblings; an explicit --cwd still wins (#​742, fixes #​324, #​680)
  • 9219636 Updated runtime dependencies: js-yaml 4 -> 5 (YAML files parse as before, #​689), prettier ^3.9 (short unions that fit on one line are no longer wrapped; users on the existing ^3.2.5 range may already see this), @​apidevtools/json-schema-ref-parser ^11.9 (#​686)
  • a5834aa Removed the is-glob dependency (#​643)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from remal as a code owner September 4, 2026 03:09
@renovate renovate Bot added the dependencies label Sep 4, 2026
@renovate renovate Bot assigned remal Sep 4, 2026
@mergify
mergify Bot merged commit 013cbdf into main Sep 4, 2026
5 checks passed
@mergify
mergify Bot deleted the renovate/json-schema-to-typescript-16.x branch September 4, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant