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

Fallback to JSON name when matching URL parameter. #450

Merged
merged 15 commits into from
Oct 3, 2017

Conversation

tgeng
Copy link

@tgeng tgeng commented Aug 31, 2017

No description provided.

@tgeng
Copy link
Author

tgeng commented Aug 31, 2017

Normally proto field names follow snake_case and proto compiler converts them to camel case for JSON mapping. As a result, Rest API clients uses camel cases for json fields when talking to gRPC servers behind the grpc gateway.

This snake_case <-> camelCase conversion is not honored for URL parameters. As a result, client has to use snake_case for URL parameters. This creates an inconsistency between names of JSON objects in HTTP body and names of URL parameters.

@tgeng
Copy link
Author

tgeng commented Sep 1, 2017

The build failure is caused by the master branch not being updated after the grpc dependency change, which is out of the scope of this change.

@achew22
Copy link
Collaborator

achew22 commented Sep 5, 2017

Could you add some tests to exercise this behavior and prevent future regressions?

@tgeng
Copy link
Author

tgeng commented Sep 5, 2017

Thanks achew22! Updated the PR with tests.

@tmc
Copy link
Collaborator

tmc commented Sep 14, 2017

Thanks for your contribution! master has a build system fix, can you please rebase this?

@tgeng
Copy link
Author

tgeng commented Sep 14, 2017

Weird, I am not sure why cla/google check does not go through. I am using my @google account so it should be good. Any idea what might go wrong?

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this State. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@tgeng
Copy link
Author

tgeng commented Sep 26, 2017

Hi all, I am guessing an author of this commit might not have signed cla/google. I am a Google employee and this account is associated with my corporate account, so I should not need to sign anything.

@achew22
Copy link
Collaborator

achew22 commented Sep 26, 2017

Can you rebase your commit off of master so that you no longer have that commit included after grpc-ecosystem/grpc-gateway's master? That should eliminate the warning.

@tgeng
Copy link
Author

tgeng commented Sep 28, 2017

Hmm it looks like cla/google check is stuck this time. Any suggestions on what I can do next?

@achew22
Copy link
Collaborator

achew22 commented Sep 28, 2017

I pinged the CLA bot manager and asked him to take a look. If you don't hear back from me by Monday, please ping and we will work it out manually

@tgeng
Copy link
Author

tgeng commented Oct 2, 2017

Hi achew22, it seems cla/google check is still stuck. Can you take a look? Thanks!!

@achew22
Copy link
Collaborator

achew22 commented Oct 3, 2017

I just manually verified you have signed the CLA. Sorry about all this. I guess something is wrong with the bot 🤷‍♂️ .

Thanks for your patience and your contribution!

@achew22 achew22 merged commit ac41185 into grpc-ecosystem:master Oct 3, 2017
@tgeng
Copy link
Author

tgeng commented Oct 3, 2017 via email

adasari pushed a commit to adasari/grpc-gateway that referenced this pull request Apr 9, 2020
* Fallback to JSON name when matching URL parameter.
* Add tests using JSON name for URL param parsing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants