diff --git a/components/definition/definition.go b/components/definition/definition.go index 5601738..0d4da22 100644 --- a/components/definition/definition.go +++ b/components/definition/definition.go @@ -138,7 +138,7 @@ func (g DefinitionGenerator) createStructDefinitions(structType reflect.Type) ma }, IsRequired: g.isRequired(field), } - if structType == field.Type.Elem() { + if structType == field.Type.Elem().Elem() { continue // prevent recursion } g.CreateDefinition(reflect.New(field.Type.Elem().Elem()).Elem().Interface())