use class-validator to validate request object
class Test{ @IsBoolean() test:Boolean;}export class Router{ @GET('/test') @Validate({schema:Test,error:(errors)=> { throw new Error(`${errors.map(error=>Object.values(error.constraints))}`) },ValidateType.QueryParams) async test(){ ctx.body = 'origin'; }}
Generated using TypeDoc
use class-validator to validate request object