OpenAPI Documentation for gRPC services

202 views
Skip to first unread message

Michael Hamrah

unread,
Aug 30, 2018, 9:51:44 AM8/30/18
to Google Cloud Endpoints
I'm wondering if OpenAPI annotations or some other service-level documentation is supported when using gRPC for Cloud Endpoints. 

It seems the api yaml config requires a Rules reference which has no notion of description, etc. Is there a way to annotate either a proto file with a description/title or other OpenAPI attributes, or add this customization to the api config yaml file in addition to http rules? In reviewing https://cloud.google.com/endpoints/docs/openapi/dev-portal-add-custom-docs that seems more like adding new pages or customizing the portal, not annotating messages or methods. 

Thank you

Andrew Gunsch

unread,
Aug 30, 2018, 3:06:23 PM8/30/18
to mha...@gmail.com, Google Cloud Endpoints
Hey Michael,

Thanks for writing!

Have you checked out the documentation for updating gRPC docs? It has a couple simple examples of how to document proto files, mostly just comments directly above each class/field. (just noticed the "Portal Demo" link is broken but should point here).

I'm not sure what you mean by "OpenAPI attributes/annotations" though if you're building a gRPC service. If the above doesn't answer your question, can you clarify that part?

Best,
- Andrew


--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/ff166d91-6c65-4c9b-906b-9822b6534e35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Hamrah

unread,
Aug 30, 2018, 3:13:14 PM8/30/18
to Andrew Gunsch, Google Cloud Endpoints
Perfect, Thanks! I missed that in the docs. Re: annotations I was referring to grpc-gateway Swagger options (or something similar) as specified here: https://github.com/grpc-ecosystem/grpc-gateway/blob/master/protoc-gen-swagger/options/annotations.proto 

I like the comment-file approach as its less verbose. 
Reply all
Reply to author
Forward
0 new messages