fix: update openapi spec to specify optional expiry argument available to be passed in via request body.

Also updated test runner to ignore any request bodies in spec that are explicitly not required.
This commit is contained in:
Julian Lam
2023-05-01 11:19:04 -04:00
parent 2b70063eec
commit b3787bd50c
2 changed files with 15 additions and 1 deletions

View File

@@ -447,7 +447,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';