OpenAPITools / OpenAPITools/openapi-generator

[REQ] i want to change the goal in my parent to share just the common config with all modules and generate the target in the child module

Open
#15,829 0 comments 0 reactions 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

in my parent my goal is not the generate i have my parent project and inside it there's many modules that main object is generating the target for my swagger yaml
in my parent, i have this code :
<executions> <execution> <goals> <goal>generate</goal> </goals> <configuration> <skipValidateSpec>true</skipValidateSpec> <inputSpec>./src/main/resources/*****.yaml</inputSpec> <output>${project.build.directory}/generated-sources/api</output> <generatorName>spring</generatorName> <configOptions> <openApiNullable>false</openApiNullable> <useJakartaEe>true</useJakartaEe> <skipDefaultInterface>false</skipDefaultInterface> <useOneOfInterfaces>ture</useOneOfInterfaces> <hideGenerationTimestamp>true</hideGenerationTimestamp> <useSwaggerUI>true</useSwaggerUI> <documentationProvider>springdoc</documentationProvider> <useTags>true</useTags> <delegatePattern>true</delegatePattern> <basePackage>****</basePackage> <useSpringController>true</useSpringController> <requestMappingMode>api_interface</requestMappingMode> <configPackage>****</configPackage> <testOutput>****</testOutput> </configOptions> </configuration> </execution> </executions>

in my module child

<plugin> <groupId>org.openapitools</groupId> <artifactId>openapi-generator-maven-plugin</artifactId> <version>6.2.1</version> <executions> <execution> <goals> <goal>generate</goal> </goals> <configuration> <inputSpec>./src/main/resources/Promotion/api-promotion-swagger.yaml</inputSpec> </configuration> </execution> </executions> </plugin>

i want to change the goal in my parent to share just the common config with all modules and generate the target

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 by reviewing the parent and child Maven plugin configurations shown in the issue, focusing on how executions and configuration are inherited between modules. Confirm the expected Maven configuration behavior and verify that common settings remain in the parent while the child supplies its own input specification and runs the generate goal.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, spring
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.