Issue parsing pointers in external files
Hi there,
Great work on swagger-parser. I'm having an issue though: bundling pointers inside an externally reffed file seems to include the name of the pointer, where it shouldn't. I'm guessing the pointers are pretty much ignored.
Try parsing https://github.com/OAI/OpenAPI-Specification/tree/master/examples/v2.0/yaml/petstore-separate from the OpenAPI specs (the entry point is spec/swagger.api), and then validating it.
File spec/swagger.apirefers to parameters.yaml#/tagsParam. Bundling will include the parameters.yaml file and even select tagsParam, but it also -- incorrectly -- includes the tagsParamtag itself, rendering the resulting swagger.json invalid.
Let me know if I missed something here! Thanks for taking a look.
Just to add - if the issue can be verified - I would guess this issue belongs more in json-schema-ref-parser than here.
Yeah, that's a bug that has been fixed in the latest version of json-schema-ref-parser, but there are some breaking changes, so Swagger Parser hasn't been updated yet.
Ah, excellent! Thank you for putting in the time.
Swagger Parser v4.0 beta is now available, and includes the fix for this issue.
You can install the beta using npm install swagger-parser@beta.