Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nestjs-swagger-koa

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestjs-swagger-koa

NestJS module for generating Swagger documentation for Koa applications

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Nest Logo

A module for generating Swagger documentation for Koa applications in NestJS.

NPM Version NPM License NPM Downloads Last commit

About

This library is a NestJS module for generating Swagger documentation for Koa applications. Was created due this issue in the official NestJS Swagger module. Also, this library is based on the official NestJS Swagger module and NestJS Koa adapter.

Installation

$ npm install --save nestjs-swagger-koa @nestjs/swagger nest-koa-adapter
$ yarn add nestjs-swagger-koa @nestjs/swagger nest-koa-adapter
$ pnpm add nestjs-swagger-koa @nestjs/swagger nest-koa-adapter

Usage

Usage was not changed from the official NestJS Swagger module. You can find the usage in the official documentation here. All you need to do is to replace the @nestjs/swagger module with nestjs-swagger-koa and import the NestKoaAdapter from nest-koa-adapter. Here is an example:

import { NestFactory } from '@nestjs/core';
import { DocumentBuilder } from '@nestjs/swagger';
import { AppModule } from './app.module';
import { KoaSwaggerModule } from 'nestjs-swagger-koa';

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 = KoaSwaggerModule.createDocument(app, config);
    KoaSwaggerModule.setup('api', app, document);

    await app.listen(3000);
}

bootstrap();

Stay in touch

License

MIT © Alexey Filippov

Keywords

FAQs

Package last updated on 16 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc