huma icon indicating copy to clipboard operation
huma copied to clipboard

Add alias for empty input/output payload.

Open kvizyx opened this issue 6 months ago • 1 comments
trafficstars

Hi! I would like to suggest adding a new type alias for empty input/outputs. Right now, if a route does not accept any input and/or output, it should be defined as a pointer to an empty structure. In my project I have a separate type alias for this as it is more convenient and clearer, so I thought it might be nice to have it built-in (e.g. huma.Empty, huma.EmptyPayload).

If you think this can be helpful, I'd like to contribute.

kvizyx avatar May 01 '25 08:05 kvizyx

@kvizyx thanks for opening an issue! I think it this increases readability then I'd be happy to add it. Feel free to create a PR!

danielgtaylor avatar May 09 '25 23:05 danielgtaylor