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

Add swagger for gRPC REST #7075

Merged
merged 34 commits into from
Aug 28, 2020
Merged

Add swagger for gRPC REST #7075

merged 34 commits into from
Aug 28, 2020

Conversation

atheeshp
Copy link
Contributor

ref: #5921

Description

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

scripts/protocgen.sh Outdated Show resolved Hide resolved
@anilcse anilcse changed the title swagger gen command added Add swagger gen cmd for gRPC REST Aug 17, 2020
@codecov
Copy link

codecov bot commented Aug 20, 2020

Codecov Report

Merging #7075 into master will decrease coverage by 0.93%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #7075      +/-   ##
==========================================
- Coverage   54.78%   53.85%   -0.94%     
==========================================
  Files         563      418     -145     
  Lines       38624    30117    -8507     
==========================================
- Hits        21162    16219    -4943     
+ Misses      15730    12608    -3122     
+ Partials     1732     1290     -442     

@anilcse anilcse changed the title Add swagger gen cmd for gRPC REST Add swagger for gRPC REST Aug 22, 2020
@anilcse anilcse marked this pull request as ready for review August 22, 2020 11:49
scripts/protocgen.sh Outdated Show resolved Hide resolved
@@ -0,0 +1,90 @@
{
"swagger": "2.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

If i'm not mistaken, there's a new version 3, rebranded to OpenAPI. Why don't we use v3 instead? Maybe the merging issue will not even be relevant anymore.

Edit: that's why grpc-ecosystem/grpc-gateway#441. Keeping this comment for an FYI.

@aaronc aaronc mentioned this pull request Aug 24, 2020
43 tasks
Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

ACK, installed swagger-combine on my machine and ran this.

Just a file permission change request.

scripts/protoc-swagger-gen.sh Show resolved Hide resolved
@alexanderbez alexanderbez added T:Docs Changes and features related to documentation. C: gRPC Issues and PRs related to the gRPC service and HTTP gateway. REST labels Aug 27, 2020
Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

Can you clarify how would it work for a custom app to create and combine their own swagger files?

client/grpc-gateway/config.json Show resolved Hide resolved
scripts/protoc-swagger-gen.sh Show resolved Hide resolved
scripts/protocgen.sh Outdated Show resolved Hide resolved
@anilcse anilcse requested a review from fedekunze August 27, 2020 19:19
@fedekunze fedekunze added the A:automerge Automatically merge PR once all prerequisites pass. label Aug 28, 2020
@mergify mergify bot merged commit d02cd16 into master Aug 28, 2020
@mergify mergify bot deleted the atheesh/5921-swagger-gen branch August 28, 2020 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C: gRPC Issues and PRs related to the gRPC service and HTTP gateway. T:Docs Changes and features related to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants