-
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
Fix #1117: Support response examples. #1124
Fix #1117: Support response examples. #1124
Conversation
Add support for examples in operation annotation responses. Merge custom response data into the default 200 response.
Codecov Report
@@ Coverage Diff @@
## master #1124 +/- ##
==========================================
+ Coverage 53.63% 53.68% +0.05%
==========================================
Files 42 42
Lines 4182 4187 +5
==========================================
+ Hits 2243 2248 +5
Misses 1692 1692
Partials 247 247
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.
This looks great to me, I had a question about the swagger.yaml change, but it's not a blocker. I was wondering if we could add a section to the docs explaining how a user can use this? Thanks for taking the time to implement this!
Where in the documentation do you think this should live? I did a quick look-through, and wasn't sure where to put it. For what it's worth, I generally look at |
I think we could do with a section on customising the swagger output. It could just be including some links to the big protofile. I appreciate your time is valuable so don't worry about writing too much.
Yeah I often tell users this and it's not obvious enough to beginners. We should've had a link to this file for a long time already. |
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.
@johanbrandhorst I took a stab at some documentation improvements. They do not specifically reference this new feature, but they highlight that this kind of thing is possible and point at a_bit_of_everything.proto
Great work on this! Really appreciate the thoroughness and responsiveness. |
Thank you for being so responsive! You're doing great work as a maintainer in the ecosystem - we've seen that both in this project and in others (e.g. https://github.com/grpc-ecosystem/go-grpc-middleware ). |
) * Fix grpc-ecosystem#1117: Support response examples. Add support for examples in operation annotation responses. Merge custom response data into the default 200 response. * Regenerate files. * Documentation improvements.
) * Fix grpc-ecosystem#1117: Support response examples. Add support for examples in operation annotation responses. Merge custom response data into the default 200 response. * Regenerate files. * Documentation improvements.
Add support for examples in operation annotation responses. Merge
custom response data into the default 200 response.