diff --git a/goagen/codegen/validation_test.go b/goagen/codegen/validation_test.go index 9339f9c9..b279ec13 100644 --- a/goagen/codegen/validation_test.go +++ b/goagen/codegen/validation_test.go @@ -442,7 +442,16 @@ const ( utCode = ` if val.Foo == nil { err = goa.MergeErrors(err, goa.MissingAttributeError(` + "`context`" + `, "foo")) + } + if val.Foo2 != nil { + if err2 := val.Foo2.Validate(); err2 != nil { + err = goa.MergeErrors(err, err2) + } }` - utRequiredCode = `` + utRequiredCode = ` if val.Foo2 != nil { + if err2 := val.Foo2.Validate(); err2 != nil { + err = goa.MergeErrors(err, err2) + } + }` )