-
Notifications
You must be signed in to change notification settings - Fork 14
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
Official go client #14
Comments
I'm really struggling with swagger-codegen and the stapi.yml file. With all languages (not just go) it's currently breaking on reading the model. The following commands
all experience this when parsing the model
and subsequently only generate a subset of the client. Only the Animal API |
Also it seems that the $ref are being generated incorrectly in the swagger spec: Please see: |
Hi, Richard. Thanks for taking time investigating this. When I was writing this, swagger-codegen was especially troublesome around definitions paths. I remember different styles of $refs worked in different versions, and also some of the official examples didn't work as expected. What I came up with here was pretty much what allowed me to generate Java clients. I understand though that go-swagger is different and it's implemented from scratch in Go. What is proposed in go-swagger/go-swagger#2443 (comment) however:
doesn't work with my version of swagger-codegen and produces an error. Let me first ask some questions on go-swagger issue you've linked, then I'll see if a version of stapi that satisfied both generators can be assembled. |
@cezarykluczynski you are welcome to ask questions at https://github.com/go-swagger/go-swagger/issues. At go-openapi/ & go-swagger we try to abide as much as possible by the jsonschema v4 definition of what a $ref is. There are some corner cases where we still fail (e.g. complex patterns of cyclic refs, windows paths, etc.) but basically, we get it right for the hundreds of spec and examples that run daily on our CI. |
I would love a client in go, I am willing to help out in this regard.
The text was updated successfully, but these errors were encountered: