swagger-parser icon indicating copy to clipboard operation
swagger-parser copied to clipboard

swagger-parser not resolving external schema references

Open jphorx opened this issue 7 years ago • 3 comments

I've found that when using swagger-parser on valid OpenAPI specifications that use references for schemas, these references can not be successfully resolved by the parser. Other types of references seem to work fine.

Affected version: 2.0.9, though I tried earlier ones and also 2.0.10-SNAPSHOT and they seemed to have similar issues.

I've attached a simple maven project I built to demonstrate the issue, along with a stripped down 'petstore' spec example with external schema references.

swagger-parser-bug.zip

Once built, just run: java -jar jarname.jar /resources/petstore.yaml

jphorx avatar Feb 20 '19 19:02 jphorx

Hi, @jphorx I've review the .zip you sent and the petstore.yaml file is trying to reference a Pets schema which is not in the remote location. please review if there is an issue.

gracekarina avatar Feb 25 '19 20:02 gracekarina

Hi @gracekarina I apologize, I must have bundled the wrong supplementary .yaml or made another error. I'll try to figure out which it is and I'll update here / close the issue as needed.

jphorx avatar Feb 26 '19 03:02 jphorx

Apologies but I can no longer reproduce the issue I was observing earlier. If it recurs I'll open a new issue.

jphorx avatar Feb 26 '19 03:02 jphorx