OpenAPITools / OpenAPITools/openapi-generator
[REQ] Add interface the represents all InlineResponses generated
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.
Right now in a project I'm working on I have a class that does the calls, so it gets a ModelInterface and returns a ModelInterface which is the Hydramember.
Then the code inspector complains that I call methods like getHydratotalItems() and getHydramember() on a ModelInterface object.
I think those methods should be described in an interface so they don't have to be redefined in all InlineResponse, most of the stuff there could even be moved to a base class so we have less code duplication.
And also the we can pass all those classes to a method to handle calls like I'm trying to do.
Describe the solution you'd like
Add an interface that defines the InlineResponse objects and maybe a base class for them also.
Describe alternatives you've considered
Just adding the interface.
Additional context
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 files, tests, or generator entry points are named. Start by locating the Java InlineResponse implementations and the generation templates that produce them, then determine the shared methods and scope of any base class; done means generated InlineResponse types share the requested interface and callers can use those methods without redefinition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100