Skip to content

[Java][JavaResteasyServerCodegen] dateLibrary=java8 is ignored and joda added instead #9753

@user667

Description

@user667
Description

When generating server code via io.swagger.codegen.v3.generators.java.JavaResteasyServerCodegen using dateLibrary=java8 then com.fasterxml.jackson.datatype.joda.JodaModule and some is added to the JacksonConfig class instead of com.fasterxml.jackson.datatype.jsr310.JavaTimeModule. This causes compilation to fail.

Swagger-codegen version

This happens when using version 3.* (3.0.12-SNAPSHOT) and 2.4.* (2.4.9-SNAPSHOT).

Swagger declaration file content or url

Any.

Command line used for generation

Using Maven to generate the code via https://gist.github.com/user667/57dd1c96de0fbaeacf850a99f9cd0749

Steps to reproduce

Simply generate the code via Maven from any valid YAML Swagger declaration file.

Related issues/PRs
Suggest a fix/enhancement

This problem stems from the fact that the mustache template files (./modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/JacksonConfig.mustache for version 2.4.* and swagger-codegen-generators/src/main/resources/handlebars/JavaJaxRS/resteasy/JacksonConfig.mustache in project generators for version 3.0.*) do not contain the switch for java8/joda.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions