Skip to content

Infinite recursion when Type used in GRPC has an ArrayOf cyclic attribute #2515

Open
@nitinmohan87

Description

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() {})
  })
})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions