Open adnsimona opened 7 months ago
This would indeed help a lot. I'm maintaining an api which has about 50 model classes. In my Kotlin dto, the model classes are all separated into small packages. But the generated Typescipt model is thrown all together in one folder. This is not the kind I want to provide the model to other devs. And it also violates the Separation of Concerns (SoC) principle.
I want to group classes wich belogs each other. Otherwise its hart to understand a model. For example, an enum named Type
doesn't make sense in a root folder. It may even collide with other types with the same name. But in a package named collection.book
it may become expressive. Like a field has a class context, the class should have a package context.
Describe the solution you'd like
It would be nice to be able to set subpackage for generated model classes.
Now if the model package option of openapi generator was set to
com.example.project.someapi.models
, theClassToPlaceInSubPackage
would go to thepackage com.example.project.someapi.models.sub.pkg;
.