-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Recursive model errors during flattening stage of generate server #1796
Labels
Comments
Could reproduce in |
fredbi
added a commit
to fredbi/analysis
that referenced
this issue
Nov 16, 2018
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/analysis
that referenced
this issue
Nov 16, 2018
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
I think I solved the issue in go-openapi analysis. |
fredbi
added a commit
to fredbi/analysis
that referenced
this issue
Nov 16, 2018
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Nov 16, 2018
* fixes go-swagger#1796 * fixes go-swagger#1774 * fixes go-swagger#1767 Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Nov 16, 2018
* fixes go-swagger#1796 * fixes go-swagger#1774 * fixes go-swagger#1767 Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Nov 17, 2018
* fixes go-swagger#1796 * fixes go-swagger#1774 * fixes go-swagger#1767 Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
casualjim
added a commit
to go-openapi/analysis
that referenced
this issue
Nov 17, 2018
Fix go-swagger/go-swagger#1796 (circular $ref with cycle in remote)
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Nov 17, 2018
* fixes go-swagger#1796 * fixes go-swagger#1774 * fixes go-swagger#1767 Updates vendor from go-openapi/analysis Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Nov 18, 2018
* fixes go-swagger#1796 * fixes go-swagger#1774 * fixes go-swagger#1767 Updates vendor from go-openapi/analysis Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Nov 19, 2018
* fixes go-swagger#1796 * fixes go-swagger#1774 * fixes go-swagger#1767 Updates vendor from go-openapi/analysis Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Nov 22, 2018
* fixes go-swagger#1796 * fixes go-swagger#1774 * fixes go-swagger#1767 Updates vendor from go-openapi/analysis Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Nov 28, 2018
* fixes go-swagger#1796 * fixes go-swagger#1774 * fixes go-swagger#1767 Updates vendor from go-openapi/analysis Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem statement
I have a recursive model that is separated into a models file that is referred to by "$ref" tag. When I try to generate the server it panics during the flattening process. So you can also test by just running the flattening. If I remove the recursion it works just fine. To remove recursion I just change in the QueryNode model all "$ref": "#/QueryNode" to "type": "object"
Part of the output messages with debug turned on.
Swagger specification
So I have a swagger json definition. The top level file contains the paths. Models are found in a subfolder models. FYI this is a small part of a very large swagger project.
./queryIssue.json
./models/query.json:
./models/pair.json:
Steps to reproduce
Run: swagger flatten -o queryIssueFlatten.json --format=json --with-expand queryIssue.json
or
Run: swagger generate server -f queryIssue.json -A queryissue
Both commands give the same issue
Environment
swagger version: 0.17.2 and master branch
go version: 1.10.x, 1.11.x
OS: Centos 7
Attached are all the json files and the complete log output.
issue.zip
The text was updated successfully, but these errors were encountered: