serverless-openapi-documenter 0.0.45 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "serverless-openapi-documenter",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "description": "Generate OpenAPI v3 documentation and Postman Collections from your Serverless Config",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -151,10 +151,10 @@ class DefinitionGenerator {
151
151
  path.servers = servers
152
152
  }
153
153
 
154
- let slashPath = event?.http?.path || event.httpApi?.path
154
+ let slashPath = (event?.http?.path || event.httpApi?.path) ?? '/'
155
155
  const pathStart = new RegExp(/^\//, 'g')
156
156
  if (pathStart.test(slashPath) === false) {
157
- slashPath = `/${event?.http?.path||event.httpApi?.path}`
157
+ slashPath = `/${(event?.http?.path||event.httpApi?.path)?? ''}`
158
158
  }
159
159
 
160
160
  if (paths[slashPath]) {