Skip to content

[JAVA] Import mappings should be a list, rather than a string, with maven plugin #5383

@mtakaki

Description

@mtakaki
Description

Currently, with the maven plugin, the import-mappings is unmanageable as the number of models grows. It's currently a single string parameter, comma-separated, but it becomes hard to read and spot mistakes when there are several classes.

Swagger-codegen version

2.2.1, 2.2.2, 2.2.3-SNAPSHOT

Swagger declaration file content or url

Any example with import-mappings can show how hard it is to managed this. For example:

<configOptions>
    <import-mappings>json_model=com.mypackage.Model,json_anothermodel=com.mypackage.AnotherModel</import-mappings>
</configOptions>
Command line used for generation

mvn generate-sources

Related issues

Could not find any related issue.

Suggest a Fix

If it's was a list, like below, it would be much easier to handle it:

<configOptions>
    <import-mappings>
        <param>json_model=com.mypackage.Model</param>
        <param>json_anothermodel=com.mypackage.AnotherModel</param>
    </import-mappings>
</configOptions>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions