Skip to content

fix(json-schema): encode \ pointer tokens per RFC 6901 - #6283

Open
deepshekhardas wants to merge 1 commit into
colinhacks:mainfrom
deepshekhardas:fix/to-json-schema-ref-pointer-escaping
Open

fix(json-schema): encode \ pointer tokens per RFC 6901#6283
deepshekhardas wants to merge 1 commit into
colinhacks:mainfrom
deepshekhardas:fix/to-json-schema-ref-pointer-escaping

Conversation

@deepshekhardas

Copy link
Copy Markdown

Summary

This PR fixes the JSON Schema \ pointer encoding to properly escape / and ~ characters per RFC 6901.

Changes

  • Updated packages/zod/src/v4/core/to-json-schema.ts to escape pointer tokens
  • Added tests in packages/zod/src/v4/classic/tests/to-json-schema.test.ts

Related

Superseded by #6257 (fix/json-pointer-encoding) and #6277 (fix/json-pointer-encoding) which have more complete implementations.

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.

1 participant