Skip to content

[BUG] OpenAPI 4.0.2 not able to generate anyOf models. #4576

@charmygarg

Description

@charmygarg
Description

I have created a swagger file openapi: 3.0.0 having Account and Contact as references in anyOf something like this:

anyOf:
              - $ref: "#/components/schemas/Account"
              - $ref: "#/components/schemas/Contact"
openapi-generator version

4.0.2

Steps to reproduce

After running mvn generate-sources command swagger generates models in /target folder. The issue here is that swagger is not able to generate class AnyOfAccountContact which it should be.

The error looks like this:
error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Inline Schema HandlingSchema contains a complex schema in items/additionalProperties/allOf/oneOf/anyOfIssue: Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions