Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

xphir
Copy link
Contributor

@xphir xphir commented Aug 25, 2025

Summary

Fixes #5151

Resolves issue where tuple schemas with rest elements and metadata IDs generated incorrect internal paths when targeting draft-7, causing improper schema extraction and reference generation.

Changes

  • Fixed hardcoded path names in tuple processing to be target-aware
  • Added regression test

xphir added 2 commits August 25, 2025 21:05
…olinhacks#5151

Adds test that exposes bug where tuple schemas with rest elements and
metadata IDs generate incorrect internal paths when targeting draft-7,
causing improper schema extraction and reference generation.
Fixes issue colinhacks#5151 where tuple schemas with rest elements and metadata IDs
generated incorrect internal paths when targeting draft-7, causing improper
schema extraction and reference generation.

The bug was in hardcoded path names regardless of JSON Schema target:
- draft-2020-12 should use "prefixItems" and "items"
- draft-7/draft-4 should use "items" and "additionalItems"
- openapi-3.0 should use indexed "items"
@colinhacks colinhacks merged commit 8bf0c16 into colinhacks:main Aug 26, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v4] toJSONSchema - tuple with rest elements and meta ids generates incorrect JSON Schema for draft-7
2 participants