quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

Generation of Protobuf .proto Files

Open mikes-blend opened this issue 6 years ago • 5 comments

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

mikes-blend avatar Jul 20 '19 00:07 mikes-blend