You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Similarly to the issue reported in #2824,
I'm having issues when using @JsonProperty with @Jacksonizedwhen using @JsonProperty on the getter.
"Why are you doing that?", you ask. Well, I'm not. But openapi-generator is.
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "my_name" (class com.whatever.Test$JacksonExample$JacksonExampleBuilder), not marked as ignorable (2 known properties: "name", "age"])
at [Source: (String)"{"my_name": "Joe", "age": 27}"; line: 1, column: 14] (through reference chain: com.sesame.bison.pubsub.PhotonUserPrescriptionReceiverTest$JacksonExample$JacksonExampleBuilder["my_name"])
Expected behavior
I would expect the value to be deserialized correctly. Alternatively, I'd like an exception to be thrown, if this is indeed not supported.
Version info (please complete the following information):
Lombok version: 1.18.32
Platform: javac 21
Additional context
You could argue that this issue should be raised with the openapi-generator folks, but we are the ones adding @Jacksonized (for reasons that have been lost to time, but presumably it was needed).
To be clear, I don't expect you to support any and all wacky combinations of annotations. But there's clearly an assumption that having these annotations on the getter should be sufficient. Maybe the openapi-generator folks are wrong about this. That's a possibility.
Should I expect this to work when only the getter is annotated, or must the annotation be attached to the field?
The text was updated successfully, but these errors were encountered:
Describe the bug
Similarly to the issue reported in #2824,
I'm having issues when using
@JsonProperty
with@Jacksonized
when using@JsonProperty
on the getter."Why are you doing that?", you ask. Well, I'm not. But openapi-generator is.
To Reproduce
This gives me:
Expected behavior
I would expect the value to be deserialized correctly. Alternatively, I'd like an exception to be thrown, if this is indeed not supported.
Version info (please complete the following information):
Additional context
You could argue that this issue should be raised with the openapi-generator folks, but we are the ones adding
@Jacksonized
(for reasons that have been lost to time, but presumably it was needed).To be clear, I don't expect you to support any and all wacky combinations of annotations. But there's clearly an assumption that having these annotations on the getter should be sufficient. Maybe the openapi-generator folks are wrong about this. That's a possibility.
Should I expect this to work when only the getter is annotated, or must the annotation be attached to the field?
The text was updated successfully, but these errors were encountered: