Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 757 Bytes

README.md

File metadata and controls

40 lines (28 loc) · 757 Bytes

protoc-gen-connect-openapi

protoc-gen-connect-openapi generates OpenAPI YAML files for Connect from Protocol Buffers definition.

⚠️ protoc-gen-connect-openapi supports OpenAPI 3.0.

Usage

  1. Install and configure buf

  2. Install protoc-gen-connect-openapi

go install github.com/s-takehana/protoc-gen-connect-openapi@latest
  1. Create a OpenAPI template
info:
  title: Example API
  version: 0.1.0
  1. Configure a buf.gen.yaml file
version: v1
plugins:
  - name: connect-openapi
    out: .
    opt:
      - template=path/to/protoc-gen-connect-openapi_template.yaml
  1. Execute buf
buf generate