ProtoBuf Definitions
This folder contains api definition written in protocol buffer. The api will be used for building services.
Prerequisite
In order to run generation commands successfully, please make sure you have following tools installed in your environment.
Run following command to build proto-generator image. We will use it to generate apis.
Note: you can actually skip this step, and it will download a prebuilt image instead.
make build-image
Auto Generation
Go Client and Swagger
make generate
Clients
We postpone the client generation until there's external service needs for communication.
API reference documentation
Use the tools bootprint-openapi and html-inline to generate the API reference from the swagger files. Refer to design doc for more details of the API and architecture.
Third Party Protos
Third party proto dependencies are sync back to proto/third_party for easy development (IDE friendly).
Actually, we should specify the directory in which to search for imports instead.
protoc -I.
-I/go/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
-I/go/src/github.com/grpc-ecosystem/grpc-gateway/ \
-I/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/ \
Source: