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

Support reserved json name and add tests #1085

Merged
merged 4 commits into from
Nov 14, 2019
Merged

Support reserved json name and add tests #1085

merged 4 commits into from
Nov 14, 2019

Conversation

xin-au
Copy link
Contributor

@xin-au xin-au commented Nov 14, 2019

Support reserved JSON name and add tests.
Like: when a reserved JSON name is specified in protobuf, then the swagger doc will generate this reserved JSON name instead of a lower case camel variable name.
Ref: #1084

@codecov-io
Copy link

codecov-io commented Nov 14, 2019

Codecov Report

Merging #1085 into master will increase coverage by 0.03%.
The diff coverage is 90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1085      +/-   ##
==========================================
+ Coverage   53.84%   53.87%   +0.03%     
==========================================
  Files          42       42              
  Lines        4175     4178       +3     
==========================================
+ Hits         2248     2251       +3     
  Misses       1681     1681              
  Partials      246      246
Impacted Files Coverage Δ
protoc-gen-swagger/genswagger/template.go 57.26% <90%> (+0.11%) ⬆️

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 f712043...f5bb28d. Read the comment docs.

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.

This looks great to me, thanks!

@johanbrandhorst johanbrandhorst merged commit 9087bb8 into grpc-ecosystem:master Nov 14, 2019
@xin-au
Copy link
Contributor Author

xin-au commented Nov 14, 2019

@johanbrandhorst , Thank you so much for reviewing! Anytime!

adasari pushed a commit to adasari/grpc-gateway that referenced this pull request Apr 9, 2020
* Support reserved json name and add tests

* Correct some variable names

* Optimize a logic for assigning a reserved json name to jsonCamelCaseName

* Put a logic for checking if there is a reseved json name in the method of lowerCamelCase

Fixes grpc-ecosystem#1084
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