We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following code:
JsonPointer .valueOf("/") .appendProperty("paths") .appendProperty("/things") .appendProperty("post") .appendProperty("requestBody") .appendProperty("content") .appendProperty("application/json") .appendProperty("schema")
should produce this json pointer: /paths/~1things/post/requestBody/content/application~1json/schema
/paths/~1things/post/requestBody/content/application~1json/schema
Instead it produces this json pointer: /paths/things/post/requestBody/content/application/json/schema
/paths/things/post/requestBody/content/application/json/schema
As you can see, the / at the start of /things and the / in the middle of application/json are not escaped, producing a completely incorrect path.
/
/things
application/json
(You also need to escape ~ correctly as per RFC 69010
~
The text was updated successfully, but these errors were encountered:
(Incidentally, wouldn't it make sense to have a JsonPointer.ROOT constant that evaluates to JsonPointer.valueOf("/")?)
JsonPointer.ROOT
JsonPointer.valueOf("/")
Sorry, something went wrong.
@Mahoney Escaping part does look like a straight bug, yes.
As to JsonPointer for "/": no, semantics are such that "/" is for matching root level property with "empty" name like:
JsonPointer
"/"
{ "" : 42 }
as opposed to representing root value itself.
"Root" pointer, however, exists as JsonPointer.empty() and is created for empty String.
JsonPointer.empty()
Fix #1145: escape property in JsonPointer.append(String)
property
JsonPointer.append(String)
252f9d5
fb69554
Due to change in observed behavior, fixing in 2.17 for next minor release (2.17.0), cannot backport into 2.16.
No branches or pull requests
The following code:
should produce this json pointer:
/paths/~1things/post/requestBody/content/application~1json/schema
Instead it produces this json pointer:
/paths/things/post/requestBody/content/application/json/schema
As you can see, the
/
at the start of/things
and the/
in the middle ofapplication/json
are not escaped, producing a completely incorrect path.(You also need to escape
~
correctly as per RFC 69010The text was updated successfully, but these errors were encountered: