You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to get parsed parameters after the validation process.
Imagine you have a request:
/** * GET /visit/list * @summary get list of visits * @param {string} some-header-param.header - some header string value * @param {boolean} booleanParam.query - some boolean value * @param {integer} intParam.query - some integer value */router.get('/list',validateRequest(),async(req,res)=>{constsomeHeaderParam=req.headers[''];const{booleanParam, intParam}=req.query;// the problem:// we need to gather params from header, query, body and path and to convert there values to previously described types// here booleanParam and intParam are string and we need to explicitly convert them before use});
The suggest is to either set some req property to parsed list of params or to introduce another method to simplify request object parsing.
The text was updated successfully, but these errors were encountered:
It would be nice to get parsed parameters after the validation process.
Imagine you have a request:
The suggest is to either set some req property to parsed list of params or to introduce another method to simplify request object parsing.
The text was updated successfully, but these errors were encountered: