Skip to content

Second level of ref object not parsing correctly #319

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

Closed
gustavorodrig opened this issue Oct 26, 2016 · 0 comments
Closed

Second level of ref object not parsing correctly #319

gustavorodrig opened this issue Oct 26, 2016 · 0 comments
Milestone

Comments

@gustavorodrig
Copy link

gustavorodrig commented Oct 26, 2016

Swagger parser doesn't parse correctly many levels of references when in the second reference are an object that is referencing another file

Imagine this scenario:

`
Main.yaml:

Mail:
type: object
properties:
message:
$ref: "../files/Definitions.yaml#/definitions/Message"


Definitions.yaml:

Message:
type: object
properties:
content:
type: object
properties:
contentMessage:
$ref: "../files/others.yaml#/Content"


Others.yaml:

Content:
type: object
properties:
text:
type: string
`

In this scenario swagger creates a POJO (ContentMessage) withou any properties and dont create the last object (Content)

I added some code to consider this situation and i will do a pull request.

gustavorodrig pushed a commit to gustavorodrig/swagger-parser that referenced this issue Oct 26, 2016
@fehguy fehguy closed this as completed Oct 27, 2016
@fehguy fehguy modified the milestone: v1.0.23 Oct 28, 2016
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