OpenAPITools / OpenAPITools/openapi-generator
[REQ] Option to generate only the models/controllers
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.
The generators can only generate complete projects with models and controllers. However, I would like to use the generator as part of the normal build process to create generated files of the models and controllers, allowing me to enforce an API-first approach to changes.
Describe the solution you'd like
I want to exclude parts of the generated files so that it can only create the model and controller files. As changes to the Open API spec are made, new models and controllers can be generated, either as part of the build or as checked in.
Describe alternatives you've considered
Manually generate an entire project each time a change to the OpenAPI spec is made, and then selectively move the model and controller files into the destination project where they are used. The problem is that this is very error-prone.
Another approach is to use only a "code-first" approach to designing our API, generating the OpenAPI spec from the code and avoiding using the open API generators altogether.
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
The issue names no files, tests, or generator entry point. Start by locating the generator configuration that controls which artifacts are emitted; done means a tested option can generate only model and controller files from an OpenAPI specification without the other project files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100