Skip to content

Commit 38fab79

Browse files
authored
Merge pull request #190 from JaredCE/fix-responseModels
Fix response models
2 parents 59e4d3a + 9d3fb42 commit 38fab79

File tree

5 files changed

+19
-20
lines changed

5 files changed

+19
-20
lines changed

.github/workflows/node.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,26 @@ name: Node.js CI
55

66
on:
77
push:
8-
branches: [ "main" ]
8+
branches: ["main"]
99
pull_request:
10-
branches: [ "main" ]
10+
branches: ["main"]
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
strategy:
1817
matrix:
19-
node-version: [14.x, 16.x, 18.x]
18+
node-version: [16.x, 18.x, 20.x]
2019
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2120

2221
steps:
23-
- uses: actions/checkout@v3
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v3
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
cache: 'npm'
29-
- run: npm ci
30-
- run: npm run build --if-present
31-
- run: npm test
22+
- uses: actions/checkout@v3
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: "npm"
28+
- run: npm ci
29+
- run: npm run build --if-present
30+
- run: npm test

.github/workflows/npm-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
- uses: actions/checkout@v3
1515
- uses: actions/setup-node@v3
1616
with:
17-
node-version: 16
17+
node-version: 18
1818
- run: npm ci
19-
# - run: npm test
19+
# - run: npm test
2020

2121
publish-npm:
2222
needs: build
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v3
2626
- uses: actions/setup-node@v3
2727
with:
28-
node-version: 16
28+
node-version: 18
2929
registry-url: https://registry.npmjs.org/
3030
- run: npm ci
3131
- run: npm publish

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "serverless-openapi-documenter",
3-
"version": "0.0.94",
3+
"version": "0.0.95",
44
"description": "Generate OpenAPI v3 documentation and Postman Collections from your Serverless Config",
55
"main": "index.js",
66
"keywords": [

src/definitionGenerator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ class DefinitionGenerator {
443443

444444
this.currentStatusCode = response.statusCode;
445445

446-
if (Object.keys(response.responseModels).length) {
446+
if (response?.responseModels) {
447447
obj.content = await this.createMediaTypeObject(
448448
response.responseModels,
449449
"responses"

0 commit comments

Comments
 (0)