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
Cannot construct instance of com.example.bug.Condition (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
The text was updated successfully, but these errors were encountered:
@esfomeado
It fails due to Jackson.
When generating an object by JacksonArbitraryIntrospector, it serializes all of fields and then deserializes.
So in this case, it fails when serialize and deserialize conditions.
In this case @JsonSubTypes and @JsonTypeInfo is needed, but it is not supported in Fixture Monkey yet.
It is supported soon.
Describe the bug
If I set a field to use the
JacksonArbitraryIntrospector
all the field fields will now use theJacksonArbitraryIntrospector
instead the default one.Your environment
Java 17
FixtureMonkey - 0.4.10
Steps to reproduce
Run
invalidIntrospector
on https://github.com/esfomeado/fixture-monkey-bug/blob/f5ca2c55e543a04cab279245fddfe6b946f59e5a/src/test/java/com/example/bug/FixtureMonkeyTest.javaExpected behaviour
Should generate the class correctly.
Actual behaviour
Class not generated.
Cannot construct instance of
com.example.bug.Condition(no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
The text was updated successfully, but these errors were encountered: