OpenAPITools / OpenAPITools/openapi-generator
[REQ] maven plugin: remove `generateApis` and `apisToGenerate`
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Problem
The openapi-generator-maven-plugin currently has 3 different options to influence which Apis will be generated: generateApis, apisToGenerate and globalProperties.apis. OpenAPI Generator itself only knows about globalProperties.apis. generateApis and apisToGenerate work by openapi-generator-maven-plugin modifying globalProperties.apis.
Some disadvantages with that:
- Having 3 options where 1 would be sufficient adds complexity and confusion.
- This led to bugs in the past: https://github.com/OpenAPITools/openapi-generator/issues/4506
- Setting
generateApis=falsedoesn't actually guarantee that API are not generated. (Specifically when also setting generateModels=false and generateSupportingFiles=false.)
related: https://github.com/OpenAPITools/openapi-generator/issues/16257
Proposal
Therefore I propose to remove the options generateApis and apisToGenerate. All the available functionality is accessible by setting globalProperties.apis accordingly.
The same probably also applies to globalProperties.models and globalProperties.supportingFiles.
If this proposal is accepted by a maintainer, I'd be open to work on a PR.
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
Start by reviewing the openapi-generator-maven-plugin handling for generateApis and apisToGenerate, then inspect the related tests and plugin documentation. Confirm how globalProperties.apis currently provides the same functionality and define done as removing the two options without losing supported API-selection behavior; the possible models and supportingFiles changes need maintainer confirmation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100