Description
This is related to an old issue which was closed with documentation improvements: #1435.
A fix was applied to the Jersey library, for some parts of the thread safety issues - response headers, and response status codes: #7453, #7605
I would like to fix this issue for the RestTemplate library
Swagger-codegen version
Using 2.4.2 but applies to the current Master (HEAD) as well
Swagger declaration file content or url
https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache#L95
Command line used for generation
Any - N/A
Related issues/PRs
#1435
#7453
#7605
Suggest a fix/enhancement
I am happy to provide a PR for the issue that perform the same changes as PR: #7605 but applied to the RestTemplate library.
Another option I was considering was to create a PR as above but also to go a step further and address some of the other thread safety issues raised in #1435.
This would include making the following fields immutable:
- debugging
- defaultHeaders
- basePath
- restTemplate
- authentications
- dateFormat
That would involve creating a builder class as suggested in #1435
Weather this would move the RestTemplate library to far from the other Java libraries may be an issue, thoughts?
Note: Either of the above approaches would be non backward compatible as #7605 was.
Description
This is related to an old issue which was closed with documentation improvements: #1435.
A fix was applied to the Jersey library, for some parts of the thread safety issues - response headers, and response status codes: #7453, #7605
I would like to fix this issue for the RestTemplate library
Swagger-codegen version
Using 2.4.2 but applies to the current Master (HEAD) as well
Swagger declaration file content or url
https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache#L95
Command line used for generation
Any - N/A
Related issues/PRs
#1435
#7453
#7605
Suggest a fix/enhancement
I am happy to provide a PR for the issue that perform the same changes as PR: #7605 but applied to the RestTemplate library.
Another option I was considering was to create a PR as above but also to go a step further and address some of the other thread safety issues raised in #1435.
This would include making the following fields immutable:
That would involve creating a builder class as suggested in #1435
Weather this would move the RestTemplate library to far from the other Java libraries may be an issue, thoughts?
Note: Either of the above approaches would be non backward compatible as #7605 was.