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

References outside #/components/... fail to parse #24

Closed
danielgtaylor opened this issue Jul 27, 2018 · 4 comments · Fixed by #207
Closed

References outside #/components/... fail to parse #24

danielgtaylor opened this issue Jul 27, 2018 · 4 comments · Fixed by #207

Comments

@danielgtaylor
Copy link
Collaborator

As noted in apisprout#1 it looks like some references can fail to parse. For example:

{
  "$ref": "#/paths/~1v1~1servers/get/responses/200/content/application~1json/schema/properties/meta"
}

will fail to parse but is valid according to the spec. Rather than referencing a predefined component it is reusing a piece of another response schema. Ideally the parser would handle these cases regardless of what the link starts with.

@fenollp
Copy link
Collaborator

fenollp commented Aug 2, 2018

I'm all for reviewing a PR fixing this but do not have time to write it :)

@AbhimanyuG
Copy link

To anyone who's interested, I've posted a bounty for this bug: https://www.bountysource.com/issues/61426741-references-outside-components-fail-to-parse

@fenollp
Copy link
Collaborator

fenollp commented Dec 16, 2019

Is this still an issue now that #155 is merged?

@chriswa
Copy link
Contributor

chriswa commented Apr 23, 2020

Yes, it is. There are hardcoded prefixes required on different ref types.

I've added pull request #207 to fix this issue.

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

Successfully merging a pull request may close this issue.

4 participants