From 213870566c6d1ebbcb494bdfb499cdc4222f2dd1 Mon Sep 17 00:00:00 2001 From: Jacob Gonzalez <36113236+njacob1001@users.noreply.github.com> Date: Fri, 20 Dec 2024 02:40:26 -0500 Subject: [PATCH] fix: @name for recursion (#1948) * restore: @name parsing behavior * feat: add schema name if there is a recursion Co-authored-by: njacob1001 --- parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.go b/parser.go index 6d1644a88..7a0b59e64 100644 --- a/parser.go +++ b/parser.go @@ -1316,7 +1316,7 @@ func (parser *Parser) ParseDefinition(typeSpecDef *TypeSpecDef) (*Schema, error) parser.debug.Printf("Skipping '%s', recursion detected.", typeName) return &Schema{ - Name: typeName, + Name: typeSpecDef.SchemaName, PkgPath: typeSpecDef.PkgPath, Schema: PrimitiveSchema(OBJECT), },