OpenAPITools / OpenAPITools/openapi-generator

[REQ] Feature Request Description Can we not generate empty package org.openapitools.configuration?

Open
#17,317 1 comment 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

Is your feature request related to a problem? Please describe.

When I generate SpringBoot3 WebFlux backend code. config like this below. I noticed that it generate an empty package org.openapitools.configuration, I was wondering if we can remove this empty package.

                      <execution>
                        <id>thing</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <generatorName>spring</generatorName>
                            <apiPackage>com.huaweicloud.iiot.thingmanager.api.thing</apiPackage>
                            <invokerPackage>com.huaweicloud.iiot.thingmanager.invoker.thing</invokerPackage>
                            <modelPackage>com.huaweicloud.iiot.thingmanager.model.thing</modelPackage>
                            <inputSpec>${project.basedir}/src/main/resources/yaml/thing.yaml</inputSpec>
                            <generateApis>true</generateApis>
                            <generateModels>true</generateModels>
                            <generateSupportingFiles>true</generateSupportingFiles>
                            <skipValidateSpec>true</skipValidateSpec>
                            <supportingFilesToGenerate>ApiUtil.java</supportingFilesToGenerate>
                            <configOptions>
                                <delegatePattern>true</delegatePattern>
                                <library>spring-boot</library>
                                <openApiNullable>false</openApiNullable>
                                <reactive>true</reactive>
                                <useSpringBoot3>true</useSpringBoot3>
                            </configOptions>
                        </configuration>
                    </execution>

Describe the solution you'd like

If org.openapitools.configuration is empty, don't generate it.

Additional context

If community needs volunteer, I'm willing to help submit a PR. But I need some hints :)

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 reproducing the SpringBoot3 WebFlux generation with the Maven configuration shown, especially generateSupportingFiles and supportingFilesToGenerate. Trace the Spring generator's package and supporting-file generation, then add coverage for this configuration; done means org.openapitools.configuration is absent when it would otherwise be empty.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.