-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
897 fixing problem while generating swagger documentation for enum messages #898
Conversation
This pull request will fix issue #897 |
Codecov Report
@@ Coverage Diff @@
## master #898 +/- ##
=========================================
+ Coverage 53.69% 53.7% +0.01%
=========================================
Files 39 39
Lines 3926 3927 +1
=========================================
+ Hits 2108 2109 +1
Misses 1621 1621
Partials 197 197
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly, I don't understand what this fixes. Why does the applied change fix a comment that ends in a dot?
Could we add some tests for this case as well?
Thanks
It's a very strange behavior but if you look line protoc-gen-swagger/genswagger/template.go:1246 you will see a condition to avoid executing a particular flow if the comment has a dot at the end. So when the support for enum and objects annotation was added I forget to take into consideration this case causing in this particular case to fallback to condition protoc-gen-swagger/genswagger/template.go:1275. So basically I'm only changing condition protoc-gen-swagger/genswagger/template.go:1268 to the default fallback that existe before the changes but keeping the code needed to support the comments override behavior. I don't have a clear idea how to make a test to test particular condition thats why I added an example case on examples/proto/examplepb/a_bit_of_everything.proto:166 to be sure that the problem was fixed but keeping past changes.
|
Thanks for your contribution :) |
…containing a dot (grpc-ecosystem#898) Fixes grpc-ecosystem#898
No description provided.