Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Resolve escaped "/" and "~" in JSON references #1725

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

nntzuekai
Copy link
Contributor

Fixes #1573 and #1703

In JSON references, the character "~" and "/" should be escaped as "~0" and "~1", respectively (RFC 6901). The current version of JsonReferenceResolver would fail on resolving these references.

This fix adds support to ref paths containing these special chars by substituting them with "/" and "~" for each reference segment. Note that it replaces "~1" first to avoid transforming "~01" to "/" incorrectly (which should be "~1").

@RicoSuter RicoSuter merged commit ade92a0 into RicoSuter:master Nov 19, 2024
2 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.

JsonReferenceResolver does not support paths containing '/' escaped with '~1'
2 participants