Spring Framework 7 removed several methods from the HttpHeaders class. The generated ApiClient template uses removed methods (containsKey and entrySet) that have been removed in favor of new methods (containsHeader and headerSet).
generatorName = "java"
library = "restclient"
Description
Spring Framework 7 removed several methods from the HttpHeaders class. The generated ApiClient template uses removed methods (
containsKeyandentrySet) that have been removed in favor of new methods (containsHeaderandheaderSet).spring-projects/spring-framework#33913
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-7.0-Release-Notes#httpheaders-changes
openapi-generator version
7.14.0
OpenAPI declaration file content or url
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/Java/libraries/restclient/ApiClient.mustache#L362
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/Java/libraries/restclient/ApiClient.mustache#L715
Generation Details
Spring Framework 7.0.0-M7 or Spring Boot 4.0.0-M1
Suggest a fix
headerSet()exists as of Spring Framework6.1.15butcontainsHeaderwas added with Spring Framework7.0, and unfortunately at this time there is no fallback or intermediate solution, and likely a new generation option for using Spring Framework 7 or Spring Boot 4 might be necessary.