huma icon indicating copy to clipboard operation
huma copied to clipboard

empty array will be send out as null

Open ScriptType opened this issue 1 month ago • 2 comments

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.

ScriptType avatar May 29 '24 11:05 ScriptType