Skip to content

Commit

Permalink
Extra fields allow list changes in the path block
Browse files Browse the repository at this point in the history
  • Loading branch information
SnehaThangavelu1603 committed Aug 16, 2023
1 parent 735b83a commit e6dfb35
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions functions/check-for-response-in-every-request.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module.exports = (input) => {
let keys = Object.keys(input)
let http_verbs = keys.filter((verb) => !(['parameters'].includes(verb)));
for(let index = 0; index < http_verbs.length; index++)
let extraFields = ['parameters', 'servers', 'summary', 'description', '$ref']
let httpVerbs = keys.filter((verb) => !(extraFields.includes(verb)));
for(let index = 0; index < httpVerbs.length; index++)
{
if (!input[http_verbs[index]]["responses"]) {
if (!input[httpVerbs[index]]["responses"]) {
return [
{
message: "Response body missing for the given request.",
Expand Down

0 comments on commit e6dfb35

Please sign in to comment.