Open alecar-smi opened 6 months ago
Introduced in #17052
@alecar-smi This should be fixed now via https://github.com/OpenAPITools/openapi-generator/pull/18811
Kindly retest on master
-branch (there are also pregenerated samples, you'd be looking for samples/client/petstore/java/okhttp-*
which you can easily try out without needing to build the project) or when v7.7.0 comes out and close this issue if you're happy with the result :smiley:
If generating java code, the resulting JSON class has a dependency to the class com.fasterxml.jackson.databind.util.StdDateFormat even if not using jackson as a dependency
Code with error (JSON.java): private static final StdDateFormat sdf = new StdDateFormat() .withTimeZone(TimeZone.getTimeZone(ZoneId.systemDefault())) .withColonInTimeZone(true);
My gradle task:
The generated build gradle dependencies: implementation 'io.swagger:swagger-annotations:1.6.8' implementation "com.google.code.findbugs:jsr305:3.0.2" implementation 'com.squareup.okhttp3:okhttp:4.10.0' implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0' implementation 'com.google.code.gson:gson:2.9.1' implementation 'io.gsonfire:gson-fire:1.9.0' implementation 'javax.ws.rs:jsr311-api:1.1.1' implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' testImplementation 'org.mockito:mockito-core:3.12.4' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1'
Bug present in 7.3.0 but not in 7.1.0