Skip to content

Nested oneOf and allOf when using oneOf with @JsonSubTypes #2655

Closed
@ghovhannesVM

Description

@ghovhannesVM

Describe the bug
When I use @JsonSubTypes with @Schema(oneOf = {..}), the model schema shows infinite nested oneOf and allOf. When I remove @JsonSubTypes from the parent model, everything works well. Am i doing something wrong or is this expected behaviour ?

Expected behavior
The expected behavior is to show only the oneOf field. After selecting one of the child classes, it should stop expanding.

Screenshots
The structure of the model
Screenshot 2024-07-23 at 18 10 25

The output
Screenshot 2024-07-23 at 18 13 47

Versions

  • springdoc-openapi-starter-webmvc-ui 2.1.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions