OpenAPITools / OpenAPITools/openapi-generator
[BUG] [java] deprecated call to RequestBody.create (OAuthOkHttpClient)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Generated OAuthOkHttpClient.java has a deprecated call to RequestBody.create() (parameter reorder).
openapi-generator version
6.6.0 (Latest Version Tested)
Steps to reproduce
Generate a set of Java API Calls using a .yaml file.
Actual Results: The OAuthOkHttpClient class has a deprecated call to RequestBody.create
Expected Results: The OAuthOkHttpClient class should use the non deprecated call to RequestBody.create
Related issues/PRs
#13778 covers the same issue for a different generated class.
Suggest a fix
I'm assuming that this will be the same or a similar fix as was done in commit 9e5c919560b182a348fc4ffabcda01d7d3f97f26
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 template or source that generates OAuthOkHttpClient.java and compare the deprecated RequestBody.create call with the fix described in issue #13778 and commit 9e5c919560b182a348fc4ffabcda01d7d3f97f26. Regenerate a Java client from a YAML spec and verify that OAuthOkHttpClient uses the non-deprecated call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100