OpenAPITools / OpenAPITools/openapi-generator
[REQ] [JAVA] [SPRING] Add a way to pass the content type as a method parameter
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
I use Java and the OpenApi generator to generate classes, that use the SpringBoot resttemplate or restClient to send requests through defined REST-endpoints. These requests can have different bodies and with that different content-types. I can only set the content-type of the request through the definition of the endpoint.
Describe the solution you'd like
I would like an option, that adds a content-type method parameter. With that I can manually set the content-type of the request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Java Spring generator templates and the generated RestTemplate or RestClient request methods, then trace how endpoint content types are currently selected. Done means generated client methods can accept a content-type parameter and use it for requests, with coverage for the affected generation path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100