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), },