Open mojo2012 opened 3 years ago
I managed to write my own ClassDecoratorExtension
that adds Reflect.metadata
annotations to the class properties. But it feels this could be usedful to other people too. It would be nice to have this available by default. If needed I can share the source code.
Hi,
first let me thank you for this awesome project!
Currently we generate typescript classes from our java DTO classes. Just recently we started to add swagger to our typescript application (nestjs), but unfortunately for the type to be working correctly with swagger, every property/method needs to be annotated with
@ApiProperty
(same as in java).For various reasons the nestjs cli plugin to add this annotation to every class doesn't work at all.
It would be nice to have some kind of postprocessor for the emitted typescript classes to add annotations/decorators or do even other kinds of things. As I understand it, there is a way to add a custom TypeProcessor, maybe we could extend it to also support transformation of a type's properties?
Hope we can find a good solution for this problem.
Best regards, matthias