OpenAPITools / OpenAPITools/openapi-generator

[REQ] [MVN] Support for generateMetadata option for maven plugin

Open
#15,215 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
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.

Faced .openapi-genarator/FILES and .openapi-generator/VERSION files when generate in openapi-yaml language with maven-plugin.

In order to skip above files generation, generateMetadata option is available in DefaultGenerator class (https://github.com/OpenAPITools/openapi-generator/blob/8a426b2f4a591246a6e3d85e17338ead0cd83c48/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java#L93). However, there is no option in related maven plugin CodegenMojo. Therefore, .openapi-genarator/FILES and .openapi-generator/VERSION files could not be skipped when generating in any language -except setting generateSupportingFiles to false-.

Describe the solution you'd like

By adding generateMetadata option to maven plugin CodegenMojo, we can easily skip the generation of FILES and VERSION files.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the Maven plugin's CodegenMojo and compare its options with the generateMetadata setting in DefaultGenerator.java. Trace how plugin options reach generation, then verify through the Maven plugin generation flow that metadata files can be skipped without disabling other supporting files.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.