Closed mozey closed 1 year ago
Implementing in https://github.com/mozey/httprouter-example/pull/5
Tool for generating a TypeScript client: connect-web
UPDATE Leaning above spec is not that practical. Stick to using Go structs and swagger annotations on the route handlers as in #3
Protocol buffer is an alternative to tools like Swagger.
Besides the benefits of using a binary protocol, it's potentially also more efficient to develop. The "spec" / clients are generated from interfaces and structs, no comment annotations, or manually editing JSON spec is required.
connect-go is an alternative lib for "for building browser and gRPC-compatible HTTP APIs. If you're tired of hand-written boilerplate and turned off by massive frameworks, Connect is for you.". It has the following features
The official Google implementation of gRPC has some disadvantages
As per gotime episode gRPC & protocol buffers