typescript-generator
typescript-generator copied to clipboard
Generating one rest class per spring rest controller ?
Hello @vojtechhabarta,
I already used your generator for a small project. I am thankful for your work. But i would like to use it for a bigger project. (And the code is a mess.) I just would like to know if it is possible to generate one rest client class per spring controller or at least to group some of them ? (to avoid method name collision)
Thanks
Hello,
it is still not possible (nor planned) to split output into different files. But it is possible to use restNamespacing parameter to generate one client per one controller or to group rest methods from logical set of controllers (annotated by annotation set using restNamespacingAnnotation) into one client.
I would be so nice to have each type in its own file. I want to annotate the methods with a decorator, so that they can be introspected by the swagger plugin to generate my swagger schema. It works as long as there are not too many types. But if you reach a certain limit, especially if the types have circular relations (like a Person has a Company, but also a PermissionGroup who also belongs to a company). In this case the typescript compiled doesn't know how to resolve this. It would be possible if it wasn't all just in one big file.