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
'test global property strategy SNAKE_CASE with JsonProperty annotated fields' will fail:
Test Run :micronaut-serde-jackson:test > Partition 1 in session 1 on localhost-executor-1 > GlobalPropertyStrategySpec test global property strategy SNAKE_CASE with JsonProperty annotated fields FAILED
Condition not satisfied:
val == '{"explicit_foo_bar_prop_name":"hello","abc_xyz":123}'
| |
| false
| 19 differences (63% similarity)
| {"(---------)foo_bar(----------)":"hello","abc_xyz":123}
| {"(explicit_)foo_bar(_prop_name)":"hello","abc_xyz":123}
{"foo_bar":"hello","abc_xyz":123}
at io.micronaut.serde.jackson.GlobalPropertyStrategySpec.test global property strategy SNAKE_CASE with JsonProperty annotated fields(GlobalPropertyStrategySpec.groovy:59)
Expected Behavior
Property names from
@JsonProperty
or@JsonbProperty
should take precedence over property name, translated byPropertyNamingStrategy
.Let's take a look at the following case:
result
should be{"title":"The Stand","qty":50}
with explicit property nameqty
, set by@JsonProperty
.Actual Behaviour
Actual
result
is{"title":"The Stand","quantity":50}
. Annotation property names are ignored.Steps To Reproduce
io.micronaut.serde.jackson.GlobalPropertyStrategySpec
:./gradlew :micronaut-serde-jackson:test --tests "io.micronaut.serde.jackson.GlobalPropertyStrategySpec"
'test global property strategy SNAKE_CASE with JsonProperty annotated fields'
will fail:Environment Information
No response
Example Application
https://github.com/Myshkouski/micronaut-serialization/tree/425696c939401fc74b1ccf89df120793f37e85fb
Version
4.5.0
The text was updated successfully, but these errors were encountered: