Open nartc opened 4 years ago
For now, I would consider plugins as a veeery experimental feature. We should add a dedicated chapter at some point in the future though :)
Any news about this issue?
I certainly would benefit from this feature, for example the Swagger Plugin appends decorators on the fly based on certain modifiable rules. I would enjoy being able to extend this plugin or create a new one, in order to, for instance, append the @ApiUnauthorizedResponse()
decorator to all routes which are not public. I don't know if the DiscoveryService
would suffice.
For now, I would consider plugins as a veeery experimental feature. We should add a dedicated chapter at some point in the future though :)
Is it the future now, by any chance?
Any update?
I'm also very interested in updates here, since I'm planning to create a custom transformer and I don't want to use solutions like ttypescript or ts-patch, at least not directly, and because nest.js have this feature for many years, I'm quite sure this is stable enough to be shared outside.
I'm also interested. Any news on this?
Hello again, for the use case I mentioned above, I've tried using the DiscoveryService
inside an onApplicationBootstrap()
method to obtain references to the controllers and then the route handlers. After that, I modified the metadata related to the Swagger responses. I've checked that the previous metadata existed and just appended to it but still, the modification does not appear on the Swagger UI. Maybe this is happening "too late", would someone know of an alternative? Or is this custom plugin feature absolutely necessary?
I'm submitting a...
Current behavior
Currently, there is no documentations on NestJS site to point consumers to building their own custom plugins for NestJS CLI. The information about TypeScript plugin is scarce as it is.
Expected behavior
NestJS docs should at least have a section (which page? which section?) to get developers started on how they can build and use a custom plugin with NestJS CLI
What is the motivation / use case for changing the behavior?
Consider how powerful and useful the Swagger Plugin is, it is beneficial to provide a short documentation on the topic. Maybe the consumers have their own library and they want to leverage NestJS CLI to run their plugins as well.
Others:
I can write the documentation for this. This issue is mainly seeking for an "OK" and a place (which page? which section?) where to put the documentation about this.