ng-openapi-gen icon indicating copy to clipboard operation
ng-openapi-gen copied to clipboard

Grouping models/services in folders *feature request*

Open drenda opened this issue 4 years ago • 3 comments

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

drenda avatar Jun 29 '21 10:06 drenda

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.

luisfpg avatar Jun 29 '21 11:06 luisfpg

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

drenda avatar Jun 29 '21 12:06 drenda

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 avatar Jun 29 '21 18:06 luisfpg

Closing for lack of activity

luisfpg avatar Jan 04 '23 18:01 luisfpg