Support the use of special chars in json pointers#36
Open
shenie wants to merge 2 commits intocvent:masterfrom
Open
Support the use of special chars in json pointers#36shenie wants to merge 2 commits intocvent:masterfrom
shenie wants to merge 2 commits intocvent:masterfrom
Conversation
Author
Author
|
I fixed this issue by changing code in lib/utils.ts:83 and further to The first replacement line handle the specified ~0 and ~1 special codes, the second replacement line handles the url-encoding for { and }, which is a hack as shown, but does what I need right now Pls update master accordingly, so the dependants will install correctly |
Contributor
|
Don't you want to use decodeURIComponent instead? |
it's being used in the openapi-validator-middleware, so the choice is not up to me |
Author
|
I've included the changes from @Wim-van-der-Veen Does anyone know the owner of the repo to help give this PR a little nudge? |
|
Any update on this issue? |
Based on spec https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-04 You should be able to use ~1 for slash, which we need due to the way we split api swagger files. So I hope we can add support for it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on spec https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-04
You should be able to use ~1 for slash, which we need due to the way we
split api swagger files.
So I hope we can add support for it.
EDIT
I started at https://swagger.io/docs/specification/using-ref/ which says
that takes me to https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 and in section 4 it links to JSON-Pointer
which is how I arrived at https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-04