Skip to content

[BUG] AbstractJavaCodegen unable to customize "set" type #13549

Description

@dmivankov
Description

Extending JavaClientCodegen with

    // import/interface type
    typeMapping().put("set", typeMapping().get("array"));
    // concrete type
    instantiationTypes().put("set", instantiationTypes().get("array"));

and generating schema with arrays with uniqueItems=true sometimes results in compilation error due to missing "ArrayList" import.

openapi-generator version

6.2.0, regression since 5.0.0 (could be even earlier for types other than "set")

OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

Use type mappings for "set" everywhere in AbstractJavaCodegen imports.
#13550

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions