-
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
feat: add option to add description to tags #2939
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.
Hi, thanks for your PR! This looks pretty neat to me, almost deceptively so. I'm going to rope in @ivucica for his thoughts on the changes since he's the original author.
Looks like we ran into some CI errors |
Hmm, seems like lint failed on removal of reserved fields, that is the correct process for that? Isn't it supposed to fail? |
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.
I would ignore that lint error, we can merge over it. Your change looks right to me. The error here assumes that the field number was reserved because it has been removed (https://docs.buf.build/breaking/rules#reserved_message_no_delete), which is not the case here.
Cool, committed the suggestion as well |
Thanks @same-id for this great work! @johanbrandhorst can we add extensions to the Tag object as well, maybe in a separate PR? |
I think this'd have to start as a separate issue since it's pretty broad scope, could you create one? |
Created issue here |
@same-id @johanbrandhorst what would happen in the case a user defines their own tags at root level of open api object but dont disable the default rendering of service tags? Would the user defined tags override the default service tag generation, or does it get appended to it? How should this work? |
The example added here already shows what happens - the tags are simply appended to the end of the service tags. |
Please rebase/merge on |
After I regenerate I'm having lots of unrelated
Can you try and execute swagger-codegen (version 2.4.8) on master and check if it's not in sync? |
You need to reinstall the plugin again, there was a change in the latest PR. Run |
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.
LGTM, and I chatted with @ivucica about this change, he's happy too.
Rebased |
@same-id can we get this over the hump? I have an issue that depends on changes here and would love to get started on that. Great work btw! |
This failure is an expected false positive, I will merge as-is. |
Thanks for your contribution @same-id! |
Is there a community for grpc-gateway? |
@same-id join Gophers Slack and find the |
) [](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) | require | minor | `v2.11.3` -> `v2.13.0` | --- ### Release Notes <details> <summary>grpc-ecosystem/grpc-gateway</summary> ### [`v2.13.0`](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v2.13.0) [Compare Source](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.12.0...v2.13.0) #### What's Changed - Updated gRPC code Cancelled replaced with HTTP code 499 by [@​tech-sumit](https://github.com/tech-sumit) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2957](https://github.com/grpc-ecosystem/grpc-gateway/pull/2957) - fix: remove default service tag generation for methods by [@​kkolur](https://github.com/kkolur) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2960](https://github.com/grpc-ecosystem/grpc-gateway/pull/2960) - Use tag instead of has pin for SLSA generator by [@​laurentsimon](https://github.com/laurentsimon) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2969](https://github.com/grpc-ecosystem/grpc-gateway/pull/2969) - Add Conduit to adopters by [@​hariso](https://github.com/hariso) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2981](https://github.com/grpc-ecosystem/grpc-gateway/pull/2981) - feat(gen-openapiv2): support trailing comments by [@​ionling](https://github.com/ionling) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2965](https://github.com/grpc-ecosystem/grpc-gateway/pull/2965) - feat(gen-openapiv2): keep fields next to "$ref" fields by [@​gostajonasson](https://github.com/gostajonasson) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2986](https://github.com/grpc-ecosystem/grpc-gateway/pull/2986) #### New Contributors - [@​tech-sumit](https://github.com/tech-sumit) made their first contribution in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2957](https://github.com/grpc-ecosystem/grpc-gateway/pull/2957) - [@​hariso](https://github.com/hariso) made their first contribution in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2981](https://github.com/grpc-ecosystem/grpc-gateway/pull/2981) - [@​ionling](https://github.com/ionling) made their first contribution in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2965](https://github.com/grpc-ecosystem/grpc-gateway/pull/2965) **Full Changelog**: grpc-ecosystem/grpc-gateway@v2.12.0...v2.13.0 ### [`v2.12.0`](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v2.12.0) [Compare Source](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.11.3...v2.12.0) #### What's Changed - fix: support for oneof fields in request bodies by [@​isbang](https://github.com/isbang) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2867](https://github.com/grpc-ecosystem/grpc-gateway/pull/2867) - mux: calculate verb correctly for cases like DELETE /foo/bar:archive when user provided wrong method by [@​jonathaningram](https://github.com/jonathaningram) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2870](https://github.com/grpc-ecosystem/grpc-gateway/pull/2870) - Update googleapis dependency by [@​johanbrandhorst](https://github.com/johanbrandhorst) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2875](https://github.com/grpc-ecosystem/grpc-gateway/pull/2875) - protoc-gen-openapiv2: RPC visibility setting transitively applied to messages by [@​erademacher](https://github.com/erademacher) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2880](https://github.com/grpc-ecosystem/grpc-gateway/pull/2880) - protoc-gen-openapiv2: Use json_name when generating required field names by [@​patrick246](https://github.com/patrick246) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2885](https://github.com/grpc-ecosystem/grpc-gateway/pull/2885) - fix: support service tags in OpenAPI config file ([#​2817](https://github.com/grpc-ecosystem/grpc-gateway/issues/2817)) by [@​y-takuya](https://github.com/y-takuya) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2858](https://github.com/grpc-ecosystem/grpc-gateway/pull/2858) - feat: add option to disable rendering of service tags by [@​kkolur](https://github.com/kkolur) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2928](https://github.com/grpc-ecosystem/grpc-gateway/pull/2928) - fix: required properties of message type are required in OpenAPI by [@​gostajonasson](https://github.com/gostajonasson) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2904](https://github.com/grpc-ecosystem/grpc-gateway/pull/2904) - feat: add option to add description to tags by [@​same-id](https://github.com/same-id) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2939](https://github.com/grpc-ecosystem/grpc-gateway/pull/2939) - add extensions for Tag object by [@​kkolur](https://github.com/kkolur) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2950](https://github.com/grpc-ecosystem/grpc-gateway/pull/2950) - Make registry load packages deterministically by [@​gonzaloserrano](https://github.com/gonzaloserrano) in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2945](https://github.com/grpc-ecosystem/grpc-gateway/pull/2945) #### New Contributors - [@​erademacher](https://github.com/erademacher) made their first contribution in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2880](https://github.com/grpc-ecosystem/grpc-gateway/pull/2880) - [@​patrick246](https://github.com/patrick246) made their first contribution in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2885](https://github.com/grpc-ecosystem/grpc-gateway/pull/2885) - [@​y-takuya](https://github.com/y-takuya) made their first contribution in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2858](https://github.com/grpc-ecosystem/grpc-gateway/pull/2858) - [@​kkolur](https://github.com/kkolur) made their first contribution in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2928](https://github.com/grpc-ecosystem/grpc-gateway/pull/2928) - [@​gostajonasson](https://github.com/gostajonasson) made their first contribution in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2904](https://github.com/grpc-ecosystem/grpc-gateway/pull/2904) - [@​same-id](https://github.com/same-id) made their first contribution in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2939](https://github.com/grpc-ecosystem/grpc-gateway/pull/2939) - [@​gonzaloserrano](https://github.com/gonzaloserrano) made their first contribution in [https://github.com/grpc-ecosystem/grpc-gateway/pull/2945](https://github.com/grpc-ecosystem/grpc-gateway/pull/2945) **Full Changelog**: grpc-ecosystem/grpc-gateway@v2.11.3...v2.12.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 6am on monday" in timezone Australia/Sydney, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/google/osv.dev). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yNDEuOSIsInVwZGF0ZWRJblZlciI6IjM0LjEyLjAifQ==--> Co-authored-by: Rex P <106129829+another-rex@users.noreply.github.com>
References to other Issues or PRs
Have you read the Contributing Guidelines?
Yes
Brief description of what is fixed or changed
Adding option to add description to tags by allowing specifying openapiv2 tags
Other comments