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
A progressive Node.js framework for building efficient and scalable server-side applications.
Description
OpenAPI (Swagger) module for Nest.
Installation
$ npm i --save @qbcbyb/nestjs_swagger_plugin
Quick Start
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
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
License
Nest is MIT licensed.