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

fix: output protobufAny definition using correct JSON schema #2292

Merged
merged 4 commits into from
Aug 21, 2021

Conversation

dan-j
Copy link
Contributor

@dan-j dan-j commented Aug 19, 2021

References to other Issues or PRs

Fixes #2177

Have you read the Contributing Guidelines?

Yes

Brief description of what is fixed or changed

Output the correct JSON schema for google.protobuf.Any as specified by the any.proto documentation.

Other comments

Originally created PR #2180 but this wasn't the best approach. I've closed that and opened this since it made reviewing on top of out-of-date comments difficult.

I've made three separate commits which may make reviewing easier. I've added tests as the first commit which reproduces the issue.

@dan-j
Copy link
Contributor Author

dan-j commented Aug 19, 2021

Just to help the reviewer, the only files I've changed is template.go and template_test.go. The rest of the changes are generated by make generate and bazel

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 is a great change, thank you for your thorough testing and your patience!

@google-cla
Copy link

google-cla bot commented Aug 21, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Aug 21, 2021
@johanbrandhorst
Copy link
Collaborator

@googlebot I consent.

@google-cla google-cla bot added cla: yes and removed cla: no labels Aug 21, 2021
@johanbrandhorst
Copy link
Collaborator

Just made a quick fix to the formatting of the test file :)

@codecov-commenter
Copy link

Codecov Report

Merging #2292 (31518db) into master (64a5e7e) will increase coverage by 0.47%.
The diff coverage is 81.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2292      +/-   ##
==========================================
+ Coverage   59.16%   59.64%   +0.47%     
==========================================
  Files          35       35              
  Lines        4484     4500      +16     
==========================================
+ Hits         2653     2684      +31     
+ Misses       1544     1525      -19     
- Partials      287      291       +4     
Impacted Files Coverage Δ
...otoc-gen-openapiv2/internal/genopenapi/template.go 63.77% <81.25%> (+0.67%) ⬆️
protoc-gen-openapiv2/internal/genopenapi/types.go 65.21% <0.00%> (+47.82%) ⬆️

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 64a5e7e...31518db. Read the comment docs.

@johanbrandhorst johanbrandhorst merged commit e7e4a84 into grpc-ecosystem:master Aug 21, 2021
@johanbrandhorst
Copy link
Collaborator

Thanks for your contribution!

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.

protoc-gen-openapiv2 creates incorrect schema for google.protobuf.Any
3 participants