Skip to content

OneOfs are not resolved in subtypes #2614

Closed as not planned
Closed as not planned
@aykborstelmann

Description

@aykborstelmann

Describe the bug

Given a super type and a subtype, if you use another supertype on a property of the subtype it is not resolved using oneOfs correctly, as the org.springdoc.core.converters.PolymorphicModelConverter should do.

This is because io.swagger.v3.core.jackson.ModelResolver#resolveSubtypes in ModelResolver:1542 does create the AnnotatedType with (implicitly) resolveAsRef=false.

Thus the ref is never set and thus resolvedSchema.get$ref() == null is false in PolymorphicModelConverter.java:79 and no oneOfs are resolved as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions