Skip to content

[JAVA] Generate Model Type org.joda.time.* For Variables #6404

Open
@tobwiens

Description

@tobwiens
Description

I am getting following code generated inside the model:
Here the property example:

@JsonProperty("commit_time")
  private org.joda.time.* commitTime = null;

Another example:

public CatalogObjectMetadata commitTime(org.joda.time.* commitTime) {
    this.commitTime = commitTime;
    return this;
  }
Swagger-codegen version

I used current master and v2.2.3 tag to test the code generation.

Swagger declaration file content or url

Please find the gist here: https://gist.github.com/anonymous/95b166a38734af9accd944d8b81b0c2f

Command line used for generation
Steps to reproduce

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -l java --library resteasy -Djava8=true -DgroupId=group.id.name -DartifactId=swagger-client

Related issues/PRs

I found a few issue searching for org.joda.time.* which address similar problems, but always as imports not as the type of a variable.

[EDIT]: Works with the online generator. Maybe related to this?: #6379

Suggest a fix/enhancement

Maybe I am just using the generator wrong. But using org.joda.time.* as a type looks a bit fishy.

Thank you.

Cheers,
Tobias

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions