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

Emit API definition in Swagger schema format #9

Closed
yugui opened this issue Apr 19, 2015 · 9 comments
Closed

Emit API definition in Swagger schema format #9

yugui opened this issue Apr 19, 2015 · 9 comments

Comments

@yugui
Copy link
Member

yugui commented Apr 19, 2015

Swagger provides a good way to generate API references and client libraries of the REST API.
So we should have a way to generate swagger schema from .proto file to leverage with Swagger.

@ghost
Copy link

ghost commented Jul 19, 2015

I'm currently working on it, and do you have any idea about api reponse status code?
grpc-gateway/runtime#HTTPStatusFromCode returns http status code from grpc error code, but I can't get error code from doc generator.

How about defining all?

@ghost
Copy link

ghost commented Jul 19, 2015

+ Some protobuf file to declare swagger fields are required.

@ghost
Copy link

ghost commented Aug 8, 2015

One additional note.
Google discovery doc seems like a fork of swagger without error codes.

@philips
Copy link

philips commented Aug 9, 2015

@ceram1 Can you post your current WIP branch somewhere?

@ghost
Copy link

ghost commented Aug 11, 2015

@philips Sorry for delay.

I uploaded on ceram1/grpc-gateway@3fcd9e2

It's just a backup commit, as I could not finish swagger support.

I used this command to test this, from $GOPATH/src/github.com/gengo/grpc-gateway/

go install ./protoc-gen-swagger/ && protoc -I. -I$GOPATH/src -I$GOPATH/src/github.com/gengo/grpc-gateway/third_party/googleapis  --swagger_out=. examples/a_bit_of_everything.proto 

@gosuri
Copy link

gosuri commented Oct 17, 2015

hey @ceram1, great job on swagger spec! How's it coming along?

@ghost
Copy link

ghost commented Oct 18, 2015

@gosuri I can't do it more, but it will not be hard to build a google discovery document generator.

@gosuri
Copy link

gosuri commented Oct 18, 2015

Gotcha! No worries :)

@achew22
Copy link
Collaborator

achew22 commented Jan 28, 2016

I think this can now be closed

@yugui yugui closed this as completed Jan 28, 2016
Evgeniy-L pushed a commit to Evgeniy-L/grpc-gateway that referenced this issue Nov 16, 2018
HTTP 204 No Content: The server successfully processed the request, but is not returning any content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants