Plugin for generating OpenAPI specs #17
sudorandom
started this conversation in
Show and tell
Replies: 1 comment
-
|
I was just looking for something like this, thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all 👋 ,
Since the Connect protocol exposes a normal-looking HTTP/JSON API (at least for Unary RPC methods) it has been useful to document it as if it were a "normal" HTTP API. I started by using existing tooling: protoc-gen-jsonschema+protoc-gen-doc (with a scary looking YAML template) but there were many things that were not ideal about the setup. Eventually, I created a plugin called protoc-gen-connect-openapi. From your protobuf files you can now generate OpenAPI v3.1 compatible YAML or JSON files. The paths generated match the default gRPC paths
/{namespace}.{service}/{method}pattern.This tool scratched my own itch and I've come to realize there are many others that find this tool useful as well. It's still a young tool and I haven't properly utilized every option the library supports personally so if you find any bugs or issues, please open issues and if you're ambitious enough, I very much welcome PRs.
Beta Was this translation helpful? Give feedback.
All reactions