OpenAPITools / OpenAPITools/openapi-generator
[REQ] Use interfaces for Java clients
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
As of 4.0, the Java templates directly generate classes for FooApi. This makes testing and various AOP approaches more difficult. Instead, having a separate interface FooApi and a class FooApiClient/FooApiImpl implements FooApi would make testing code that relies on the client much easier, in addition to making it easier to add advice such as caching.
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 templates that currently generate the FooApi class and trace how Java clients are produced. Done means the generated client exposes a separate FooApi interface and a FooApiClient or FooApiImpl class implementing it, while preserving the intended client behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100