huma
huma copied to clipboard
empty array will be send out as null
i have following type which im returning. type InstanceArrayResponse struct { Body []*InstanceBody }
if the Body is now an empty array i get null as a response when testing the api.
fmt.Println(instancesResponse) //&{[]}
so &{[]} is what i`m returning in the handler but in the frontend i receive null :/
When the array is Filled with values its working as expected.