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
There is not much documentation about it, but I found the following example:
@JsonbTypeInfo({
@JsonbSubtype(alias = "dog", type = Dog.class)
@JsonbSubtype(alias = "cat", type = Cat.class)})
interface Animal {}
class Dog implements Animal {
public String isDog = true;
}
class Cat implements Animal {
public String isCat = true;
}
The behaviour seems quite similar to the existing @JsonTypeInfo Annotation of Jackson. We really need this feature in order to use polymorphic DTO's with JSONB. Alternatively we could use Jackson, but unfortunately the microprofile Generator does not support it (yet).
Is your feature request related to a problem? Please describe.
According to the official communication of EF, JSONB now supports polymorphism: https://projects.eclipse.org/projects/ee4j.jsonb/releases/3.0.0
There is not much documentation about it, but I found the following example:
The behaviour seems quite similar to the existing @JsonTypeInfo Annotation of Jackson. We really need this feature in order to use polymorphic DTO's with JSONB. Alternatively we could use Jackson, but unfortunately the microprofile Generator does not support it (yet).
Describe the solution you'd like
As you already implemented a type info annotation for Jackson (see https://github.com/OpenAPITools/openapi-generator/blob/60dcf8613f6b75b606757c4a991fe018ad10ee99/modules/openapi-generator/src/main/resources/kotlin-spring/typeInfoAnnotation.mustache) it would be great to have the same for JSONB.
The text was updated successfully, but these errors were encountered: