Skip to content

Commit

Permalink
Allow multiple operations for the same path
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredCE committed Jul 22, 2022
1 parent 89237c1 commit 04dde33
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/definitionGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ class DefinitionGenerator {
slashPath = `/${event?.http?.path||event.httpApi?.path}`
}

Object.assign(paths, {[slashPath]: path})
if (paths[slashPath]) {
Object.assign(paths[slashPath], path);
} else {
Object.assign(paths, {[slashPath]: path});
}
}
}
}
Expand Down

0 comments on commit 04dde33

Please sign in to comment.