[Java][jersey2] Making response headers case-insensitive#3072
Merged
wing328 merged 2 commits intoOpenAPITools:masterfrom Jun 4, 2019
Merged
Conversation
jimschubert
added a commit
to jimschubert/openapi-generator
that referenced
this pull request
Jun 6, 2019
* master: [Java][okhttp-gson] Update dependencies (OpenAPITools#3103) Link query parameter to model object (OpenAPITools#2710) scala-play-server: fix enum names for reserved words (OpenAPITools#3080) Add @Sunn to openapi generator core team (OpenAPITools#3105) fix NPE in go generator (OpenAPITools#3104) scala-play-server: fix API doc url (OpenAPITools#3096) [maven-plugin] fix strictSpec parameter without alias (OpenAPITools#3095) Ruby: Avoid double escaping path items (OpenAPITools#3093) [Golang][client] Allow generating go client code as a submodule. (OpenAPITools#3012) [CI] Test maven plugin in Travis, move jobs from Shippable to Circle CI (OpenAPITools#3087) general support to add scopes for bearer auth too (OpenAPITools#1984) feat(java-jersey2): Making response headers case-insensitive (OpenAPITools#3072) [KOTLIN Spring] fix generation with modelNamePrefix/Suffix (OpenAPITools#3038) Mark nodejs-server as deprecated (OpenAPITools#3083) Use 4.0.2-SNAPSHOT version in gradle samples (OpenAPITools#3085)
Member
|
Thanks again for the PR, which has been included in the v4.0.2 release: https://twitter.com/oas_generator/status/1141610197766426626 |
claude bot
pushed a commit
to codanael/openapi-generator
that referenced
this pull request
Oct 29, 2025
This commit implements case-insensitive request headers for Java client generators, addressing the feature request in PR OpenAPITools#3072. Changes: - Added caseInsensitiveRequestHeaders configuration option to JavaClientCodegen - Fixed existing bug where CASE_INSENSITIVE_RESPONSE_HEADERS was using wrong setter - Updated ApiClient templates for okhttp-gson, jersey2, jersey3, and default Jersey - Headers are now stored in TreeMap with CASE_INSENSITIVE_ORDER when flag is enabled - Updated CLI option documentation to clarify which libraries support this feature Implementation details: - okhttp-gson: Modified defaultHeaderMap initialization and processHeaderParams method - jersey2/jersey3/default: Modified defaultHeaderMap initialization and allHeaderParams creation - resttemplate/webclient/restclient already use Spring HttpHeaders which is case-insensitive - native library uses interceptor pattern and doesn't need this feature The feature can be enabled with: --additional-properties=caseInsensitiveRequestHeaders=true 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh,./bin/openapi3/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.master,4.1.x,5.0.x. Default:master.Description of the PR
For Java's Jersey2, Http response headers map is made case insensitive. Previously, a similar change was released for Java's okhttp-gson library(#3029).
Jersey2 is using common apiexception mustache file and had to make a copy of it inside Jersey2 directory so that other Java clients are not effected with this change.
@bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04)