OpenAPITools / OpenAPITools/openapi-generator
[Question] Is it possible to generate 2 sets of controllers for a single set of model?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
The current state of my system is that I have a project with .yml files that generated a reactive controller.
I already have some other projects that use that.
e.g. api com.msh.generated.web.api, model com.msh.generated.web.dto
I want to also be able to implement a non-reactive controller, so I was thinking on creating a 2nd module inside that .yml project, which will generate those.
e.g. api com.msh.generated.web.mvc.api, model com.msh.reactive.web.mvc.dto
The issue is I'm now ending up with 2 sets of models; com.msh.generated.web.dto and com.msh.reactive.web.mvc.dto.
and unlike the controller, they're the same anyway.
Is there a better/another way of doing this?
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 existing .yml project configuration and the generated reactive controller and model packages. Compare the desired non-reactive controller package with the existing model package to determine whether one model set can be reused. Done means establishing whether the generator configuration supports this arrangement or what change would be required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, yaml
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100