json-schema-ref-parser
json-schema-ref-parser copied to clipboard
MissingPointerError: Token "ABC" does not exist.
I am having trouble with MissingPointerError issues.
What I am doing is pasring java swagger docs generated from io.swaggerfox.sprinffox-swagger2. It gives json docs from http://localhost:8080/v2/docs.
if reference contains space at the end of the $ref then causes above issue.
I tested dereferencing removing that space at $ref and it succeed.
example like below
{
"swagger": "2.0",
...,
"paths": {
"somepath": {
"post": {
...,
"parameterer": [
{
"in": "body",
....,
"schema": {
"ref": "#/deifinitions/ABC "
}
}
]
}
}
}
"definitions": {
...,
"ABC ": { // tested removing space at the end of "ABC "
"type": "object",
"properties": {
"abc": {
"type": "string"
}
},
"title": "ABC "
},
...
}
}
Is Springfox adding that space by itself? Can we send a pull request to Springfox to fix it? Do we need to support this trailing space?
I'm having the same issue. In my schema, there are some data that comes from clients that may or may not contain trailing spaces. When it does, the reference breaks and everything that depends on the resulting object as well.
Fixed in 11.3.1