Generation of Protobuf .proto Files
There are myriad tools in the ecosystem to generate types for all the various languages supported by quicktype, from proto files, but very little capable of going the other way. I feel this is a gap that quicktype is uniquely positioned to help solve.
Use case is this:
- An API specification already exists in one of quicktype's existing source formats. (TypeScript, JSON Schema, etc.)
- Developer wants to also provide Protobuf serialization or GRPC support for that API specification.
- Quicktype can generate the .proto definition file for the types in the API spec
- Other tools (protoc, gogoproto, protobuf.js), can generate a full serialization client from the .proto file
Challenges:
- How to ensure the Field Numbers remain consistent through generation of multiple versions of the .proto file.
Reference:
Protobuf 3: Proto File Specification: https://developers.google.com/protocol-buffers/docs/proto3
Seconded. I would use this to check "what would protobuf look like" and use that as a starting point.
Just chiming in that this would really help cut down the time spent converting existing REST API's to gRPC services. Proto3 would probably be the ideal target version as v2 isn't used as much anymore.
Hopes to add support for the conversion of pb files
news?
@HudsonAfonso I ended up using something similar to https://json-to-proto.github.io/, which worked well enough.