swagger-api / swagger-api/swagger-codegen
Feature request: Generated ApiClient should implement a non-generated interface
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I like creating simplified facades on top of the generated java clients. I also ended up creating an abstract super class for common functionality of the multiple client facades. However, there is an issue, that I can not call any methods which are present in each ApiClient such as setConnectTimeout and setBasePath from the super class without using Java reflection, because the generated ApiClient does not implement any interface that I could use.
Swagger-codegen version
2.2.1
Suggest a Fix
Would it be possible to make it implement some interface or extend a super class, which would contain the shared methods and not be generated so that the type would be same for all?
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
No source file or test is named. Start by locating the Java ApiClient generation templates and the shared client methods such as setConnectTimeout and setBasePath; done means generated Java clients expose a common non-generated type that facade superclasses can call without reflection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100