goa
goa copied to clipboard
Infinite recursion when Type used in GRPC has an ArrayOf cyclic attribute
Generating code for the DSL below leads to infinite recursion in Goa. HTTP endpoints are not affected.
var CategoryResult = ResultType("application/vnd.category", func() {
TypeName("CategoryResult")
Attributes(func() {
Field(1, "id", Int, "ID")
Field(3, "children_category", ArrayOf("CategoryResult"))
Field(4, "name", String, "name")
})
})
// Service describes a service
var _ = Service("foo", func() {
Method("bar", func() {
Result(CategoryResult)
GRPC(func() {})
})
})