-
Notifications
You must be signed in to change notification settings - Fork 9
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
Enum Types are serialized into numerics instead String #10
Comments
I was able to reproduce this, but I don't currently have any solution. See ProtobufPropertiesModule.protobufBeanDescription. The code below is able to detect the case, but I'm not sure how to make jackson return the correct type information.
|
@xehonk thanks for the firm reply. I fell into the same path but failed to parse the type to enum-strings. I tried to follow the same process as you did for String types by using Looking for an approach to add this annotation at the class level 🤔 |
It might be possible to instead return a BeanPropertyDefinition with getter and setter (as those have the right types) and without the field itself.
|
The commit aove works only one way so far. The return value is displayed properly, but when used as a parameter it completely is empty now. Not sure why. |
I have below Protobuf mapping and I am trying to use this as a response type of my REST API and then generating OpenAPI (Swagger). And also trying to use
ProtobufPropertiesModule
to exclude unwanted/additions payload within Protobuf lib.Protobuf schema
So as per the above mappings
bulkTypes
is an array of enums. But when I serialize this I am having json like belowBut, I am expecting something like below
I tried different ways to override the Jackson serialization within
ProtobufPropertiesModule
, but nothing worked, and I am exhausted now. Please let me know if there is a way to serializebulkTypes
as I mentioned above.Thanks in advance!
The text was updated successfully, but these errors were encountered: