Commit 2f7b558e authored by Diego Iván's avatar Diego Iván
Browse files

agregando bearer auth en swagger

parent f02ffd14
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -8,6 +8,16 @@ async function bootstrap() {
  const config = new DocumentBuilder()
    .setTitle('Pueblos Magicos API')
    .setVersion('1.0')
    .addBearerAuth(
      {
        type: 'http',
        scheme: 'bearer',
        bearerFormat: 'JWT',
        name: 'Authorization',
        in: 'header',
      },
      'JWT',
    )
    .build();
  const document = SwaggerModule.createDocument(app, config);
  SwaggerModule.setup('api', app, document);