Skip to content

Commit 6e13d33

Browse files
committed
if responseModels exists
1 parent 59e4d3a commit 6e13d33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)