@qbcbyb/nestjs_swagger_plugin

4.3.4 • Public • Published

Notice & Usage

This is an extension based on @nestjs/swagger, which can automatically generate the description and example of swagger according to JSDoc on the basis of @nestjs/swagger

After npm i --save @qbcbyb/nestjs_swagger_plugin, you can make the configuration in nest-cli.json like this

{
  "collection": "@nestjs/schematics",
  "sourceRoot": "src",
  "compilerOptions": {
    "plugins": ["@qbcbyb/nestjs_swagger_plugin"]
  }
}

There is no need to configure @nestjs/swagger/plugin above, because the corresponding call has been integrated in this plug-ins.

You can check this PR [auto generate description from comments] for more information.

ChangeLog

Add dtoKeyOfComment and controllerKeyOfComment in options. You can configure the property key generated by comments, default is description.

Like this:

{
  "collection": "@nestjs/schematics",
  "sourceRoot": "src",
  "compilerOptions": {
    "plugins": [
      {
        "name": "@qbcbyb/nestjs_swagger_plugin",
        "options": {
          "dtoKeyOfComment": "title",
          "controllerKeyOfComment": "summary"
        }
      }
    ]
  }
}

Readme of @nestjs/swagger

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective

Description

OpenAPI (Swagger) module for Nest.

Installation

$ npm i --save @qbcbyb/nestjs_swagger_plugin

Quick Start

Overview & Tutorial

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

Readme

Keywords

none

Package Sidebar

Install

npm i @qbcbyb/nestjs_swagger_plugin

Weekly Downloads

2

Version

4.3.4

License

MIT

Unpacked Size

60.4 kB

Total Files

32

Last publish

Collaborators

  • qbcbyb