stoplightio / json-ref-resolver

[Deprecated] Recursively resolve JSON pointers and remote authorities.
https://github.com/APIDevTools/json-schema-ref-parser
Apache License 2.0
37 stars 9 forks source link

does not support local URL file path #217

Open jianyexi opened 2 years ago

jianyexi commented 2 years ago

Describe the bug

the resolver can not resolve reference which is specified as local file URL , like

$ref: file:///C:/foo.json

will return error

''#/inner' does not exist @ 'c:/model/b.json''

To Reproduce

  1. Given this OpenAPI document
    
    C:/model/a.json
    {
    foo: {
    "$ref":"file:///C:/b.json"
    }
    }

C:/aotherModel/b.json { foo: { ....
} }



## Expected behavior

can resolve it correctly

**Screenshots**

**Environment (remove any that are not applicable):**
 - Library version: [e.g. 3.0.0]
 - OS: [Windows 11]