Closed neilogic1911 closed 3 months ago
Thank you for the nice repro. This is fixed by #3567. Note that the explicit view should be defined on the collection, not on the result, i.e.:
Result(func() {
Attribute("data", CollectionOf(Element, func() {
View("tiny")
}))
})
My API design requirement is to ensure that the elements are included under the data attribute in the response of ListElements:
The Element type have two views:
default
andtiny
. When these views appear in CollectionOf, everything works fine if thetiny collection
passed directly to theResult()
. However, when the collection is part of an attibute the tiny view will be not work correctly.demo repo