Skip to content

Commit d0fa229

Browse files
change parentName to ancestorsName
1 parent bdbe60f commit d0fa229

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/codegen/gofilegen/schema/typed_model.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func generateModelObjType(attrs codespec.Attributes, name string) CodeStatement
4545
}
4646
}
4747

48-
func getNestedModel(attribute *codespec.Attribute, parentName string, withObjTypes bool) *CodeStatement {
48+
func getNestedModel(attribute *codespec.Attribute, ancestorsName string, withObjTypes bool) *CodeStatement {
4949
var nested *codespec.NestedAttributeObject
5050
if attribute.ListNested != nil {
5151
nested = &attribute.ListNested.NestedObject
@@ -62,7 +62,7 @@ func getNestedModel(attribute *codespec.Attribute, parentName string, withObjTyp
6262
if nested == nil {
6363
return nil
6464
}
65-
res := generateTypedModels(nested.Attributes, parentName+attribute.Name.PascalCase(), true, withObjTypes)
65+
res := generateTypedModels(nested.Attributes, ancestorsName+attribute.Name.PascalCase(), true, withObjTypes)
6666
return &res
6767
}
6868

0 commit comments

Comments
 (0)