Description
Is your feature request related to a problem? Please describe.
When using the kotlin-spring
generator, I noticed that setting the basePackage
option does not automatically apply to apiPackage
and modelPackage
. I expected that specifying basePackage
would serve as the root, and the generator would place APIs under basePackage.api
and models under basePackage.model
.
However, even when basePackage
is set, I still have to manually define apiPackage
and modelPackage
. Otherwise, the generated files are not placed as expected. I'm wondering if this is an intentional behavior or an area that could be improved for consistency.
Describe the solution you'd like
I would like the generator to treat basePackage
as the root namespace, so that:
- API classes are generated under
basePackage.api
- Model classes are generated under
basePackage.model
Unless explicitly overridden by apiPackage
or modelPackage
.
Describe alternatives you've considered
Additional context
If this behavior is intended for backward compatibility reasons, I understand that it might be difficult to change.
However, if it's by design, I would appreciate a brief explanation of the rationale behind it.
I am using OpenAPI Generator 7.4.0 with Gradle. This behavior was observed using the kotlin-spring
generator. Making basePackage
behave as a true base path would help simplify configuration and reduce duplication.