Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add swagger generation with --watch mode / live reload #703

Open
loucass003 opened this issue Nov 28, 2023 · 2 comments
Open

Add swagger generation with --watch mode / live reload #703

loucass003 opened this issue Nov 28, 2023 · 2 comments
Assignees
Labels
hacktoberfest help wanted Extra attention is needed

Comments

@loucass003
Copy link
Contributor

loucass003 commented Nov 28, 2023

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

@Timur2915
Copy link

Timur2915 commented Dec 3, 2023

I think it would be nice to have multiple swagger definitions merging out of box to simplify migration to nestia.

@samchon samchon added help wanted Extra attention is needed hacktoberfest labels Dec 3, 2023
@samchon
Copy link
Owner

samchon commented Dec 3, 2023

Good idea, but do not know how to, and not enough ime to study right now.

Hope someone to contribute about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants