An open API service indexing awesome lists of open source software.

https://github.com/poowaa/nestjs-swagger-body-param-bug

Simple repository to show nestjs swagger docs body param bug
https://github.com/poowaa/nestjs-swagger-body-param-bug

Last synced: 3 months ago
JSON representation

Simple repository to show nestjs swagger docs body param bug

Awesome Lists containing this project

README

        

# NestJS swagger auto doc bug

This repository shows what's wrong with Swagger generation.

Related issue [nestjs/swagger#669](https://github.com/nestjs/swagger/issues/669)

## Usage

### Installation

Install nest cli:

```
$ sudo npm i -g @nestjs/cli
```

Clone this repo:

```
$ git clone [email protected]:PoOwAa/nestjs-swagger-body-param-bug.git
```

Change directory

```
$ cd swaggerbug
```

Install dependencies

```
$ npm i
```

Start nest application

```
$ npm run start
$ npm run start:dev # config: nest-cli.json
$ npm run start:long # config: nest-cli-long.json
```

### Check swagger documentation

1. Open a browser at http://localhost:3000/swagger
2. Check the endpoints and their parameters

## NestJS version

```
_ _ _ ___ _____ _____ _ _____
| \ | | | | |_ |/ ___|/ __ \| | |_ _|
| \| | ___ ___ | |_ | |\ `--. | / \/| | | |
| . ` | / _ \/ __|| __| | | `--. \| | | | | |
| |\ || __/\__ \| |_ /\__/ //\__/ /| \__/\| |_____| |_
\_| \_/ \___||___/ \__|\____/ \____/ \____/\_____/\___/

[System Information]
OS Version : Linux 5.3
NodeJS Version : v12.16.1
NPM Version : 6.14.4

[Nest CLI]
Nest CLI Version : 7.1.2

[Nest Platform Information]
platform-express version : 7.0.0
swagger version : 4.5.1
common version : 7.0.0
core version : 7.0.0
```