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
Hey, this is a little workaround solution how to skip body validation for some particular transaction using hooks. I'm considering making it part of the documentation.
varhooks=require('hooks');// Names of transactions to skip the body validation// Available tranasction names can be listed with `dredd --names`skipBodyValidation=['Emergency > Call first aid'];skipBodyValidation.forEach(function(transactionName){hooks.beforeValidation(transactionName,function(transaction){hooks.log('Skipping body validation for transaction "'+transactionName+'".');transaction['expected']['body']=undefined;transaction['expected']['bodySchema']=undefined;});});
The text was updated successfully, but these errors were encountered:
Hey, this is a little workaround solution how to skip body validation for some particular transaction using hooks. I'm considering making it part of the documentation.
The text was updated successfully, but these errors were encountered: