cyclosproject / ng-openapi-gen

An OpenAPI 3.0 codegen for Angular
MIT License
397 stars 132 forks source link

Grouping models/services in folders *feature request* #162

Closed drenda closed 1 year ago

drenda commented 3 years ago

This is not a bug but a feature request: is possible to group models from the same origin package (Java -> Angular Typescrypt) in different folders? I've more than 300 files generated (models + services) and it's not handy having all that files in a single folder.

Thanks

luisfpg commented 3 years ago

More than 300? Take a look on this screen shot for the cyclos4-ui project: image 800+ files! The point is that openapi doesn't have the concept of packages for models. It is possible to name them like package/subpackage/Model, and the generator handles it. But it is the only available option.

drenda commented 3 years ago

Thanks for the quick reply. I see your point, it's not a machine problem having a lot of files but a human limit :-P Could me point the documentation where there is this naming option package/subpackage/Model? I think it could help in my case.

Thanks

luisfpg commented 3 years ago

Sorry, I think there's no documentation. Actually I wrote it wrong. It's with dots as separators. That's what some tool (sorry again, which I don't remember which) generates. So, if you have as model name com.name.models.Model it will end up generated in: api/models/com/name/models/model.ts.

luisfpg commented 1 year ago

Closing for lack of activity