-
-
Save MrCube42/8dffda0dbae4ffe545b4ff497018ca5e to your computer and use it in GitHub Desktop.
In der main.ts initialisieren wir die automatische Dokumentation mit Hilfe von Swagger.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; | |
// ... | |
async function bootstrap() { | |
// ... | |
const options = new DocumentBuilder() | |
.setTitle('ngCompanion Backend') | |
.setDescription('The ngCompanion API description.') | |
.setVersion('1.0') | |
.addTag('companions') | |
.build(); | |
const document = SwaggerModule.createDocument(app, options); | |
SwaggerModule.setup('api', app, document); | |
// ... | |
} | |
bootstrap(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment