You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generated a server codegen using jaxrs as language. The JacksonJsonProvider is invalid:
The import com.fasterxml.jackson.datatype.jsr310 cannot be resolved
I had the following two lines in my config file that i fed to swagger codegen:
"dateLibrary": "java8",
"java8": true,
Removing them generates code without errors. The problem seems to be that it is importing joda not jsr310 in the pom file. If I take the Java 8 version then the pom file includes
even though I'm using Java 8 native time not joda. if I replace <artifactId>jackson-datatype-joda</artifactId>
with <artifactId>jackson-datatype-jsr310</artifactId>
then the errors go away.
Description
Generated a server codegen using jaxrs as language. The JacksonJsonProvider is invalid:
I had the following two lines in my config file that i fed to swagger codegen:
Removing them generates code without errors. The problem seems to be that it is importing joda not jsr310 in the pom file. If I take the Java 8 version then the pom file includes
even though I'm using Java 8 native time not joda. if I replace
<artifactId>jackson-datatype-joda</artifactId>
with
<artifactId>jackson-datatype-jsr310</artifactId>
then the errors go away.
Swagger-codegen version
2.3.0-SNAPSHOT
Command line used for generation
swagger-codegen generate -i push.yml -o ./ -c codegen.config.json -l jaxrs
codegen.config.json looks like (with unrelated stuff removed):
Steps to reproduce
Generate the codegen
Import into eclipse as maven project or just
mvn clean install
Suggest a fix/enhancement
As noted above, the pom dependency is wrong for Java ( I think, so that should b set correctly when the Java 8 datetime is used.
The text was updated successfully, but these errors were encountered: