FasterXML / jackson-dataformats-binary

Uber-project for standard Jackson binary format backends: avro, cbor, ion, protobuf, smile
Apache License 2.0
316 stars 136 forks source link

[Protobuf] Generate schema for fixed32 wire type #107

Open marsqing opened 7 years ago

marsqing commented 7 years ago

Can I generate a pb schema with a fixed32(wire type 5) field? I have read ProtoBufSchemaVisitor.java and did't find a way to do that. Thanks!

cowtowncoder commented 7 years ago

I think that currently assumption is that all ints and Integers produce vint types. I would be open to a feature for allowing change of defaults between fixed/variable-length. Ideally it would also be possible to somehow indicate this on per-property level, but I can't immediately think of an existing marker (like via @JsonFormat or by using some other JDK type as placeholder). But if you can think of something that could be indicate this I would be intered.