load dark theme for swagger

This commit is contained in:
Lea 2023-07-03 19:46:17 +02:00
parent 3695282edb
commit 92ac80f4fa

View file

@ -26,6 +26,7 @@ async function bootstrap() {
.setDescription('API to interact with AutoMod')
.setVersion(META.version)
.addBearerAuth({ type: 'http', name: 'API Authentication' })
.addServer('http://localhost:3000', 'Development')
.build();
const options: SwaggerDocumentOptions = {
@ -34,7 +35,10 @@ async function bootstrap() {
};
const spec = SwaggerModule.createDocument(app, swaggerConfig, options);
SwaggerModule.setup('/api', app, spec);
SwaggerModule.setup('/api', app, spec, {
customCssUrl:
'https://cdn.githubraw.com/Amoenus/SwaggerDark/master/SwaggerDark.css',
});
app.useGlobalPipes(new ValidationPipe({ skipMissingProperties: false }));