Use decorator 'ApiImplicitBody' compile error.
See original GitHub issueHi, I used decorator ApiImplicitBody from ‘’@nestjs/swagge<v1.1.4>" in controller like this:
@ApiImplicitBody({ name: 'username', description: 'some', required: true, type: 'string' })
@Post('login')
@Bind(Body())
login(body) {}
But when I want to start the project throw compile error:
(node:18200) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError
(node:18200) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I have no idea why this hanppend. Other decorator works well.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
How to Create a Compile Error on Method Decorators in ...
I am working on a library called expresskit that lets you use decorators to define routes/params/etc for express ...
Read more >How to use the @nestjs/swagger.ApiOperation function in ...
To help you get started, we've selected a few @nestjs/swagger examples, based on popular ways it is used in public projects. Secure your...
Read more >nestjs/swagger
Start using @nestjs/swagger in your project by running `npm i @nestjs/swagger`. ... The following decorators have been changed/renamed:.
Read more >How To Add Summary And Body Manually In Swagger Nestjs
We will be using Flask, Swagger Code-Gen (OpenAPI) and Connexions. ... you can use "input types" for this, by using the input all...
Read more >NestJS — The Hero We Didn't Know We Needed
This is a built-in Nest decorator that allows us to define what our params look like for this endpoint. In the strings, we're...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @kamilmysliwiec you can reopen this issue?
I figured out it is working with something like this:
@ApiImplicitBody({ name: 'body', required: true, type: PostData })