Closed elliots closed 6 years ago
I've checked something early in. Seems to be generating everything ok. Haven't actually used any of it yet :) https://github.com/elliots/protoc-gen-twirp_swagger
I checked in examples of generated clients for javascript, java, python, ruby, lua, and c# https://github.com/elliots/protoc-gen-twirp_swagger/tree/master/_example/clients
The html documentation generation is pretty nice too...
Wow, this is amazing! Really, really excellent proof of concept.
I think this should be an external plugin, but it's one we should highlight. We're certainly going to have a list of community-written generators when we have a better documentation website. For now, we should throw a list on the README.
As soon as you feel confident enough that your stuff is stable enough to recommend others use it, please send a PR to add it to the README. Again, really cool stuff! 👍
I've started work on a generating swagger files for twirp services (almost 100% based on https://github.com/grpc-ecosystem/grpc-gateway/tree/master/protoc-gen-swagger)
The clients would be JSON only (I think?), but still. Pretty useful to get working clients for java, .net, etc.. pretty quickly using https://github.com/swagger-api/swagger-codegen#overview
Would you prefer it as an external plugin (will you have a community repo or something?) or as part of the main package?
Example output from your sample proto..