tree: 72bbe96479d9d0927a9b1dc70f8cb8e94e2672c8 [path history] [tgz]
  1. examples/
  2. generator/
  3. main.go
  4. plugin_test.go
  5. README.md
apps/protoc-gen-openapi/README.md

protoc-gen-openapi

This directory contains a protoc plugin that generates an OpenAPI description for a REST API that corresponds to a Protocol Buffer service.

Installation:

    go get github.com/googleapis/gnostic
    go install github.com/googleapis/gnostic/apps/protoc-gen-openapi

Usage:

protoc sample.proto -I. --openapi_out=.

This runs the plugin for a file named sample.proto which refers to additional .proto files in the same directory as sample.proto. Output is written to the current directory.