json-schema-ref-parser/lib/bundle.js in routine remap will take external file $ref's and remap them to self-relative $refs. At the time this is done, the paths in the parsed api file have been escaped ('/' -> '~1'), so you end up with a reference that looks like:
$ref: #/paths/~1foo~1bar/content-type...
This will break anyone (such as ajv) who will parse this on '/' boundaries and use it to walk the json file to find the actual referent.
The problem may be located in crawl() which calls Pointer.join to form full paths and also escape the embedded '/'
json-schema-ref-parser/lib/bundle.js in routine remap will take external file $ref's and remap them to self-relative $refs. At the time this is done, the paths in the parsed api file have been escaped ('/' -> '~1'), so you end up with a reference that looks like:
This will break anyone (such as ajv) who will parse this on '/' boundaries and use it to walk the json file to find the actual referent.
The problem may be located in crawl() which calls Pointer.join to form full paths and also escape the embedded '/'