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
// Body Parser Middlewareapp.use(express.json());// Empty body annotationapp.use((req,_res,next)=>{if(req.body){/** * Annotates request if json body is empty before the schema defaults are * applied by the openapi framework's request validator middleware. Cannot * opt out of defaults while using the request validation middleware. * See issue: https://github.com/kogosoftwarellc/open-api/issues/903 */req.bodyIsEmpty=Object.keys(req.body).length===0;}next();});
Actual:
req.body = { status: 'Draft' }
Expected:
req.body = {}
Steps to Repo:
Thoughts:
The text was updated successfully, but these errors were encountered: