https://github.com/ttab/elephant-twirptools
A docker image that's used to genererate Twirp API code and documentation from protobuf declarations.
https://github.com/ttab/elephant-twirptools
Last synced: 5 months ago
JSON representation
A docker image that's used to genererate Twirp API code and documentation from protobuf declarations.
- Host: GitHub
- URL: https://github.com/ttab/elephant-twirptools
- Owner: ttab
- License: mit
- Created: 2023-09-04T09:59:17.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-10T13:29:40.000Z (over 1 year ago)
- Last Synced: 2025-01-10T14:34:40.600Z (over 1 year ago)
- Language: Dockerfile
- Size: 15.6 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Elephant Twirp tools
A docker image that's used to genererate Twirp API code and documentation from protobuf declarations.
Usage:
``` makefile
proto_file := repository/service.proto
generated_files := repository/service.pb.go \
repository/service.twirp.go \
docs/repository-openapi.json
module := $(shell go list -m)
TOOL := docker run --rm \
-v "$(shell pwd):/usr/src" \
-u $(shell id -u):$(shell id -g) \
ghcr.io/ttab/elephant-twirptools:v8.1.3-0
.PHONY: proto
proto: $(generated_files)
$(generated_files): $(proto_file) newsdoc/newsdoc.proto Makefile docs
$(TOOL) protoc --go_out=. --twirp_out=. \
--openapi3_out=./docs --openapi3_opt=application=repository,version=v0.0.0 \
$(proto_file)
```