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
public record Car(String model, @JsonUnwrapped @Schema(implementation=ResourcePath.class) Resource resource, boolean selected) {
}
public abstract class Resource {
}
public abstract class ResourcePath extend Resource {
public String resourcePath;
public String resourceType;
}
Resource is an abstract class, and does not contain all the fields present in ResourcePath. However, Jackson picks up all the fields and still unwrap them with @JsonUnwrapped.
The moment I specify an implementation in @Schema, resource stop being unwrapped in the openapi.yaml.
Added resolve(t, context, Collections.emptyIterator()) just before the handleUnwrapped(...) call (ModelResolver:710) to properly process @JsonUnwrapped in my project.
Hi, I have an object like
Resource
is an abstract class, and does not contain all the fields present inResourcePath
. However, Jackson picks up all the fields and still unwrap them with@JsonUnwrapped
.The moment I specify an
implementation
in@Schema
,resource
stop being unwrapped in theopenapi.yaml
.Expected
Result
The text was updated successfully, but these errors were encountered: