-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Body is not parsed to Request Body schema #106
Comments
Try converting |
Same problem, I use Interfaces |
I used import {
IsArray,
IsEmail,
IsNumber,
IsObject,
IsString,
Length,
ValidateNested,
} from "class-validator"; export class UserResponse {
@IsNumber()
id: number;
@IsString()
name: string;
@IsString()
email: string;
@IsString()
role: string;
} |
I have same problem with multiple body type, f.e. (it's only example for better understanding)
Multiple types are necessary here and there is no possibility to change way how it works. Is it even possible? |
Hi!
I am using the @Body decorator from
routing-controllers
and it somehow doesn't parse to the Swagger Docs.I read that it might have to do with using @Body and not Request Body, but
routing-controllers
does not seem to support any Request Body Decorator.The response is parsed correctly though!
Any ideas how I can also parse the Body to the schema in the Swagger docs?
Thanks a lot!
The text was updated successfully, but these errors were encountered: