Bug Report Checklist
Description
After upgrading the openapi-generator-maven-plugin to 7.20.0 I tried the new options useJackson3 and useSpringBoot4 (see #22854)
I still get the messages
- [removal] MappingJackson2HttpMessageConverter in org.springframework.http.converter.json is deprecated and marked for removal
- [removal] messageConverters(Consumer<List<HttpMessageConverter<?>>>) in Builder is deprecated and marked for removal
openapi-generator version
7.20.0
OpenAPI declaration file content or url
Generation Details
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>7.20.0</version>
<executions>
<execution>
<id>generate-client</id>
<goals>
<goal>generate</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<inputSpec>
${project.build.directory}/generated-resources/src/main/resources/api/openapi.yaml
</inputSpec>
<generatorName>java</generatorName>
<configOptions>
<library>restclient</library>
<useJakartaEe>true</useJakartaEe>
<dateLibrary>java8</dateLibrary>
<useJackson3>true</useJackson3>
<useSpringBoot4>true</useSpringBoot4>
<implicitHeaders>true</implicitHeaders>
<invokerPackage>faltfe.service</invokerPackage>
<configPackage>faltfe.config</configPackage>
<apiPackage>faltfe.api</apiPackage>
<modelPackage>faltfe.model</modelPackage>
</configOptions>
<generateModelTests>false</generateModelTests>
<generateApiTests>false</generateApiTests>
</configuration>
</execution>
</executions>
</plugin>
With the java configuration
@Configuration
@RequiredArgsConstructor
public class IamsConfiguration {
private final ArmsProperties armProperties;
@Bean
public ApiClient apiClient() {
var apiClient = new CustomApiClient().apiClient();
apiClient.setBasePath("http://localhost:8000");
return apiClient;
}
@Bean
public UserApi userApi(ApiClient apiClient) {
return new UserApi(apiClient);
}
private class CustomApiClient extends ApiClient {
ApiClient apiClient() {
var restClient = this.restClient.mutate().requestInterceptor((request, body, execution) -> {
request.getHeaders().add("tenant", "Foobar");
return execution.execute(request, body);
});
return new ApiClient(restClient.build());
}
}
}
Steps to reproduce
Generate any YAML input spec the see the log messages from Maven. There are at least two warnings about the deprections.
Related issues/PRs
#22854
Suggest a fix
I would expect that there is no warning when using Jackson3.
Bug Report Checklist
Description
After upgrading the openapi-generator-maven-plugin to 7.20.0 I tried the new options
useJackson3anduseSpringBoot4(see #22854)I still get the messages
openapi-generator version
7.20.0
OpenAPI declaration file content or url
Generation Details
With the java configuration
Steps to reproduce
Generate any YAML input spec the see the log messages from Maven. There are at least two warnings about the deprections.
Related issues/PRs
#22854
Suggest a fix
I would expect that there is no warning when using Jackson3.