nestia
nestia copied to clipboard
Add swagger generation with --watch mode / live reload
Please add a way to support live reloading with nestia
For instance in our project we use the swagger.json file
import swaggerDocument from '../swagger.json';
SwaggerModule.setup('/api', app, swaggerDocument as OpenAPIObject, {
swaggerOptions: {
defaultModelRendering: 'model',
tryItOutEnabled: true,
syntaxHighlight: {
activate: true,
},
},
});
Then we run the nestia swagger
command to regenerate the schema. this will trigger a file change of the swagger.json and we can watch that to restart the app. ,
It would be nice to have nestia to watch for changes and re generate the schema when a controller change.
This would be a really nice 'ease of use' feature.
I guess we could try to make a webpack plugin that run the command when a controller change but i think it would be better if it was handled by nestia itself.
Thanks again for this great tool <3
I think it would be nice to have multiple swagger definitions merging out of box to simplify migration to nestia.
Good idea, but do not know how to, and not enough ime to study right now.
Hope someone to contribute about this.