diff --git a/src/definitionGenerator.js b/src/definitionGenerator.js index 7b3154a..dcbed40 100644 --- a/src/definitionGenerator.js +++ b/src/definitionGenerator.js @@ -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}); + } } } }