This is a Workato Connector generator for Google Protocol Buffers compiler protoc
. The plugin generates a Connector file based on your publicly tagged methods.
go install github.com/SafetyCulture/protoc-gen-workato@latest
The plugin is invoked by passing the --workato_out, and --workato_opt options to the protoc compiler. The option has the following format:
--doc_opt=workato/config.yaml
Generation of the actions in workato relies on the usage of google.api.http
and grpc.gateway.protoc_gen_openapiv2.options
annotations.
A complete example can be found in proto/
.
This repo uses buf to build Protocol Buffers.
brew tap bufbuild/buf
brew install buf
To generate the image for fixtures run buf build -o fixtures/image.bin
.
To generate the annotations Go package run buf generate
.
Example buf generate s12/protobuf/workato/annotations.proto
.
go test -v -run TestGenerateWorkatoConnector
After you are happy with the results, to update the snapshot run this command:
UPDATE_SNAPSHOTS=true go test -v -run TestGenerateWorkatoConnector