{"id":17224835,"url":"https://github.com/pseudomuto/protoc-gen-twagger","last_synced_at":"2025-09-01T20:07:03.294Z","repository":{"id":57507460,"uuid":"120158968","full_name":"pseudomuto/protoc-gen-twagger","owner":"pseudomuto","description":"A Protobuf plugin that generates Swagger docs for Twirp Services","archived":false,"fork":false,"pushed_at":"2018-02-26T14:16:07.000Z","size":255,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T14:55:06.936Z","etag":null,"topics":["documentation","protobuf","swagger","twirp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pseudomuto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-04T05:50:23.000Z","updated_at":"2022-04-14T15:50:31.000Z","dependencies_parsed_at":"2022-09-26T18:31:31.784Z","dependency_job_id":null,"html_url":"https://github.com/pseudomuto/protoc-gen-twagger","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudomuto%2Fprotoc-gen-twagger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudomuto%2Fprotoc-gen-twagger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudomuto%2Fprotoc-gen-twagger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudomuto%2Fprotoc-gen-twagger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pseudomuto","download_url":"https://codeload.github.com/pseudomuto/protoc-gen-twagger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804721,"owners_count":21164127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","protobuf","swagger","twirp"],"created_at":"2024-10-15T04:12:06.663Z","updated_at":"2025-04-14T00:45:05.123Z","avatar_url":"https://github.com/pseudomuto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# protoc-gen-twagger\n\n[![Travis Build Status][travis-svg]][travis-ci]\n[![codecov][codecov-svg]][codecov-url]\n[![GoDoc][godoc-svg]][godoc-url]\n[![Go Report Card][goreport-svg]][goreport-url]\n\nA protobuf plugin that generates [Swagger] docs for your [Twirp] services.\n\nLots of assumptions being made at the moment...use with caution.\n\nFor a demo, clone the repo and run `make setup swagger`. Then open your browser to http://localhost:8080 and browse around.\n\n## Running the Plugin\n\nYou'll need to install the binary.\n\n`go get -u github.com/pseudomuto/protoc-gen-twagger/cmd/protoc-gen-twagger`\n\nEven better, if you use a tool like [retool](https://github.com/twitchtv/retool) you can get a specific version. For\nexample:\n\n`retool add github.com/pseudomuto/protoc-gen-twagger/cmd/protoc-gen-twagger \u003cbranch|tag\u003e`\n\nOnce installed you can invoke it with `protoc` like so:\n\n`protoc -I. -I$(GOPATH)src --twagger_out=. input_proto1.proto input_proto2.proto`\n\nThis will generate `swagger.json` in the current directory.\n\n**Using Docker**\n\nAlternatively you can run this with docker. There's a public image `pseudomuto/protoc-gen-twagger` which can be used to\nrun the plugin.\n\n```shell\ndocker run --rm \\\n  -v $(pwd)/protos:/in:ro \\\n  -v $(pwd):/out:rw \\\n  pseudomuto/protoc-gen-twagger input_proto1.proto input_proto2.proto\n```\n\nInput paths are relative from `/in` inside the container. Take a look at the `run-docker` make task for a working\nexample.\n\n[Swagger]: https://swagger.io/\n[Twirp]: https://github.com/twitchtv/twirp\n[travis-svg]:\n  https://travis-ci.org/pseudomuto/protoc-gen-twagger.svg?branch=master\n\t\"Travis CI build status SVG\"\n[travis-ci]:\n  https://travis-ci.org/pseudomuto/protoc-gen-twagger\n  \"protoc-gen-twagger at Travis CI\"\n[codecov-svg]: https://codecov.io/gh/pseudomuto/protoc-gen-twagger/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/pseudomuto/protoc-gen-twagger\n[godoc-svg]: https://godoc.org/github.com/pseudomuto/protoc-gen-twagger?status.svg\n[godoc-url]: https://godoc.org/github.com/pseudomuto/protoc-gen-twagger\n[goreport-svg]: https://goreportcard.com/badge/github.com/pseudomuto/protoc-gen-twagger\n[goreport-url]: https://goreportcard.com/report/github.com/pseudomuto/protoc-gen-twagger\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpseudomuto%2Fprotoc-gen-twagger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpseudomuto%2Fprotoc-gen-twagger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpseudomuto%2Fprotoc-gen-twagger/lists"}