-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to use converters for all well known types #278
Comments
I understand the friction of having to specify the wrapper option every time, and I've seen other code generator libraries use type mappings for this sort of thing. I hesitate to introduce that functionality for a few reasons:
|
First of all thanks for the in deep reply. That said I have been working on a workaround implementing a descriptor set preprocessor that does exactly that, it adds an extra step, and sadly the gradle Protobuf plugin does not yet support the descriptors_in option but I think we can use the workaround if this is not implemented. |
I love the converters support in this lib but it would be nice to have an option to use the wrappers that you provide as an extension, in custom wrappers (like UUID) it makes sense to define it at the field level but if a team want to use the converters every time for timestamps they need to add the option to every single field which is not a great DevEx.
I understand this should not be enforced but having the option would be nice.
An alternative would be to provide an option to define a map<Type,Converter> to be applied during code generation, with that solution it will cover well-known types and more special cases like an API where all bytes should be UUIDs.
The text was updated successfully, but these errors were encountered: