From 2da9651010b267aaa273464dfcedc18ae0860b93 Mon Sep 17 00:00:00 2001 From: Shimizu1111 <70021314+Shimizu1111@users.noreply.github.com> Date: Thu, 12 Oct 2023 10:41:06 +0900 Subject: [PATCH] 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) --- operation.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/operation.go b/operation.go index edf251002..9a02c0fd4 100644 --- a/operation.go +++ b/operation.go @@ -918,6 +918,10 @@ func parseCombinedObjectSchema(parser *Parser, refType string, astFile *ast.File return nil, err } + if schema == nil { + schema = PrimitiveSchema(OBJECT) + } + props[keyVal[0]] = *schema } }