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

Use json camel case when GetUseJSONNamesForFields is enabled #985

Merged
merged 10 commits into from
Aug 9, 2019
Merged

Use json camel case when GetUseJSONNamesForFields is enabled #985

merged 10 commits into from
Aug 9, 2019

Conversation

xin-au
Copy link
Contributor

@xin-au xin-au commented Aug 8, 2019

Use json camel case when GetUseJSONNamesForFields is enabled

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@codecov-io
Copy link

codecov-io commented Aug 8, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@fdf0635). Click here to learn what that means.
The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #985   +/-   ##
=========================================
  Coverage          ?   53.43%           
=========================================
  Files             ?       40           
  Lines             ?     4027           
  Branches          ?        0           
=========================================
  Hits              ?     2152           
  Misses            ?     1676           
  Partials          ?      199
Impacted Files Coverage Δ
protoc-gen-swagger/genswagger/template.go 54.23% <91.66%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdf0635...b9ec55f. Read the comment docs.

@xin-au
Copy link
Contributor Author

xin-au commented Aug 8, 2019

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Aug 8, 2019
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @xin-au, thanks for your contribution! Could you explain what this fixes? It looks like a bug fix to me. If you could raise an issue that is fixed by this PR that'd be great. Don't have to go into too much detail. If not, an explanation here would suffice. If this is indeed a bug fix, we should try to add some tests to prevent this from regressing in the future. Could you look into adding some tests please?

Thanks again!

@xin-au
Copy link
Contributor Author

xin-au commented Aug 8, 2019

Hi @johanbrandhorst , thanks for your suggestions and details!
I will create an issue to describe it and add some tests.
Thanks!

@xin-au
Copy link
Contributor Author

xin-au commented Aug 9, 2019

The issue associated with this PR. #986

@xin-au xin-au changed the title Use json name when GetUseJSONNamesForFields is enabled Use json camel case when GetUseJSONNamesForFields is enabled Aug 9, 2019
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, LGTM!

@johanbrandhorst johanbrandhorst merged commit 643a3cf into grpc-ecosystem:master Aug 9, 2019
@xin-au
Copy link
Contributor Author

xin-au commented Aug 9, 2019

Thanks @johanbrandhorst !

@xin-au xin-au deleted the xin/get-json-code-in-lookup-field branch August 10, 2019 15:57
adasari pushed a commit to adasari/grpc-gateway that referenced this pull request Apr 9, 2020
…osystem#985)

* Use json name when GetUseJSONNamesForFields is enabled

* Optimzed an if statement

* Merge two if statements

* Convert parameters to lower camel case in url

* Revert services.go file

* Fix an unit test

* Update bazel file

* Add an unit test for testing json camel case

* Add an unit test for testing code without enabling json camel case

* Add more corner cases

Fixes grpc-ecosystem#986
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants