Description
It should be possible to set default header for each HTTP request. Currently generated ApiClient class for resttemplate library does not allow that and creates duplicates.
The same issue was fixed 8 years ago in version 2 of the swagger-codegen: swagger-api/swagger-codegen#6981 however the fix was never backported to the version 3.
For example, after executing:
apiClient.addDefaultHeader("TestHeader", "foo");
apiClient.addDefaultHeader("TestHeader", "bar");
Only TestHeader with value bar should be added to the request.
Version
all
Language / Generator Affected
Java - resttemplate library
Related Issues / Repos
swagger-api/swagger-codegen#6976
Checklist
Description
It should be possible to set default header for each HTTP request. Currently generated ApiClient class for resttemplate library does not allow that and creates duplicates.
The same issue was fixed 8 years ago in version 2 of the swagger-codegen: swagger-api/swagger-codegen#6981 however the fix was never backported to the version 3.
For example, after executing:
apiClient.addDefaultHeader("TestHeader", "foo");apiClient.addDefaultHeader("TestHeader", "bar");Only
TestHeaderwith valuebarshould be added to the request.Version
all
Language / Generator Affected
Java - resttemplate library
Related Issues / Repos
swagger-api/swagger-codegen#6976
Checklist