Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue parsing pointers in external files #35

Open
hilkeheremans opened this issue Feb 1, 2016 · 4 comments
Open

Issue parsing pointers in external files #35

hilkeheremans opened this issue Feb 1, 2016 · 4 comments

Comments

@hilkeheremans
Copy link

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.

@hilkeheremans
Copy link
Author

Just to add - if the issue can be verified - I would guess this issue belongs more in json-schema-ref-parser than here.

@JamesMessinger
Copy link
Member

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.

@hilkeheremans
Copy link
Author

Ah, excellent! Thank you for putting in the time.

@JamesMessinger
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants