mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 16:44:49 -04:00
openapi: adds auth to all public api routes
See: https://docs.nestjs.com/openapi/security Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
2ab950c5c3
commit
33d9c455b8
5 changed files with 12 additions and 0 deletions
|
@ -26,6 +26,10 @@ async function bootstrap() {
|
|||
const swaggerOptions = new DocumentBuilder()
|
||||
.setTitle('HedgeDoc')
|
||||
.setVersion('2.0-dev')
|
||||
.addSecurity('token', {
|
||||
type: 'http',
|
||||
scheme: 'bearer',
|
||||
})
|
||||
.build();
|
||||
const document = SwaggerModule.createDocument(app, swaggerOptions);
|
||||
SwaggerModule.setup('apidoc', app, document);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue