-
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
Adding support for default and required swagger annotation fields. #852
Adding support for default and required swagger annotation fields. #852
Conversation
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.
Excellent start, could you please add some more examples with more than one required field to show how it works in that case?
It looks like this change breaks defaults when the value is unset as well - I think we need to make sure we maintain the current behavior where a default isn't specified. |
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.
What do you mean? in the definition of a_bit_of_everything.proto there are several cases where the default field is not defined and the swagger files are generated without problem, which case are you seeing?
See my last comment, enum fields had their default set to the first value previously. |
Codecov Report
@@ Coverage Diff @@
## master #852 +/- ##
==========================================
+ Coverage 51.83% 51.87% +0.04%
==========================================
Files 39 39
Lines 3764 3778 +14
==========================================
+ Hits 1951 1960 +9
- Misses 1629 1633 +4
- Partials 184 185 +1
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.
Could we add an example which contains several entries in the required field?
Thanks for this contribution! |
…rpc-ecosystem#852) * Adding support for default and required swagger annotation fields:Solves issue grpc-ecosystem#851 * Fixing test for swagger generation * updating swagger definition * removing breaking changes over enums * Adding example for required field as an array
Solves issue #851