Add Option to use RapiDoc instead of Swagger-UI
wodka opened this issue · comments
Is there an existing issue that is already proposing this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe it
Cleaner interface that shows full models for openapi
Describe the solution you'd like
Here an explanation of differences between RapiDoc / Redoc and Swagger UI: rapi-doc/RapiDoc#141
I would not add redoc here as it misses a playground / try out functionality.
Teachability, documentation, adoption, migration strategy
I am thinking about something like:
import { NestFactory } from '@nestjs/core';
import { RapiDocModule, DocumentBuilder } from '@nestjs/swagger';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const config = new DocumentBuilder()
.setTitle('Cats example')
.setDescription('The cats API description')
.setVersion('1.0')
.addTag('cats')
.build();
const document = RapiDocModule.createDocument(app, config);
RapiDocModule.setup('api', app, document);
await app.listen(3000);
}
bootstrap();
What is the motivation / use case for changing the behavior?
Cleaner interface that shows full models without to many clicks
Thanks for your suggestion!
This has been discussed in the past and we decided to not implement it in the foreseeable future.
If you think your request could live outside Nest's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.