Skip to content
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

gRPC JSON transcoding: Fix not supporting JSON name in querystring names #46624

Merged
merged 8 commits into from
Feb 18, 2023

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Feb 14, 2023

Partially addresses #45753 (the issue reports two bugs)

Message fields have two names: the internal field name, which is conventionally underscore_case, and the JSON name, which is conventionally camelCase. The JSON name can be specified manually or automatically calculated from the field name, e.g. full_name -> fullName.

gRPC JSON transcoding supports binding query string values to message fields. The query string name can be either the field or JSON name. JSON names were not supported. This PR fixes that.

@JamesNK JamesNK added the area-grpc Includes: GRPC wire-up, templates label Feb 14, 2023
@JamesNK JamesNK changed the title Fix not supporting JSON name in gRPC JSON transcoding query parameters gRPC JSON transcoding: Fix not supporting JSON name in query parameters Feb 14, 2023
@JamesNK JamesNK changed the title gRPC JSON transcoding: Fix not supporting JSON name in query parameters gRPC JSON transcoding: Fix not supporting JSON name in querystring names Feb 14, 2023
@JamesNK JamesNK merged commit c9caab2 into main Feb 18, 2023
@JamesNK JamesNK deleted the jamesnk/grpc-swagger-query-jsonname branch February 18, 2023 04:41
@ghost ghost added this to the 8.0-preview2 milestone Feb 18, 2023
@JamesNK
Copy link
Member Author

JamesNK commented Feb 20, 2023

/backport to release/7.0

@github-actions
Copy link
Contributor

Started backporting to release/7.0: https://github.com/dotnet/aspnetcore/actions/runs/4219867289

@mgravell
Copy link
Member

Note the odd naming thing is now fixed; we should probably mirror that in the transcoding layer

@ghost
Copy link

ghost commented Mar 21, 2023

Hi @mgravell. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@JamesNK
Copy link
Member Author

JamesNK commented Mar 21, 2023

Note the odd naming thing is now fixed; we should probably mirror that in the transcoding layer

#47349

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-grpc Includes: GRPC wire-up, templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants