swagger-api / swagger-api/swagger-codegen
[JAVA] Feature: Generate model as Response class with inner static class
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
is it possible to generate the model as a single class with inner static classes for the other elements of the response?
I'm using swagger codegen 2.3.1, I have already created a template as we use to use in my project, but we are currently using single class responses with inner static classes for the object elements of the response.
Is it something that is already achievable with template, or configuration, or is it needed a change in the generator main code?
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
Review the Java generator templates and generator main code referenced in the issue, first checking whether configuration or templates can express a single response class with nested static classes. Done means establishing whether this output is template/configuration-driven or requires generator changes, with the expected generated structure clearly defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100