Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Julian Lam
2023-05-10 12:12:19 -04:00
7 changed files with 37 additions and 4 deletions

View File

@@ -448,7 +448,10 @@ describe('API', async () => {
let body = {};
let type = 'json';
if (context[method].hasOwnProperty('requestBody') && context[method].requestBody.content['application/json']) {
if (
context[method].hasOwnProperty('requestBody') &&
context[method].requestBody.required !== false &&
context[method].requestBody.content['application/json']) {
body = buildBody(context[method].requestBody.content['application/json'].schema.properties);
} else if (context[method].hasOwnProperty('requestBody') && context[method].requestBody.content['multipart/form-data']) {
type = 'form';