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

When will Nest.js be supported? Thank you very much! #179

Open
gzg1500521074 opened this issue Apr 1, 2022 · 1 comment
Open

When will Nest.js be supported? Thank you very much! #179

gzg1500521074 opened this issue Apr 1, 2022 · 1 comment
Assignees
Labels

Comments

@gzg1500521074
Copy link

I mainly use nest. Js framework in my daily work. I would like to ask when it can be supported.

@sangimed
Copy link

sangimed commented Apr 12, 2022

You can already use it in NestJs by adding the following code to the main.ts file :

const swStats = require('swagger-stats');  
app.use(swStats.getMiddleware({ 
  swaggerSpec: document,
  authentication: true,
  onAuthenticate: function(req: any, username: string, password: string){
    // simple check for username and password
    return (
        username === 'username' &&
        password === 'password'
    );
  }
}));

@sv2 sv2 added the question label Apr 30, 2022
@sv2 sv2 self-assigned this Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants