Skip to content

Commit 2da9651

Browse files
authored
When the return value defined by the @success tag is equal to a null value, make fixes to prevent a null pointer exception occurs (#1667)
1 parent d23a84a commit 2da9651

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

operation.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,10 @@ func parseCombinedObjectSchema(parser *Parser, refType string, astFile *ast.File
918918
return nil, err
919919
}
920920

921+
if schema == nil {
922+
schema = PrimitiveSchema(OBJECT)
923+
}
924+
921925
props[keyVal[0]] = *schema
922926
}
923927
}

0 commit comments

Comments
 (0)