4.3.4 • Published 4 years ago

@qbcbyb/nestjs_swagger_plugin v4.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

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

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.