danielgtaylor / danielgtaylor/huma
Enabling recursive process structs for patameters
- Dominant language
- Go
- Stars
- 4.4k
- Forks
- 285
- Avg merge
- 40m
- Merged PRs (30d)
- 1
Description
On huma parameters are not checked recursively, on structs which limits us to only embedding structs for queries
on humas code on huma/huma.go line 213: it sets recurseFields to false,
, false, "Body")
but because of that it prevents use of nested structs specially for such cases
func (uh *IGenericController[T, C, U, F, Q]) OffsetPaginated(ctx context.Context, filter *struct {
Filter F
Query Q
dtos.PaginationInput
}) (*dtos.HumaResponse[dtos.PResp[[]T]], error) {
resp, err := DbFetchManyWithOffset[T](uh.GormConn, ctx, filter.Filter, filter.PaginationInput)
return dtos.PHumaReturn(resp, err)
}
because **F and Q** are Generic type i could not just embed them with out **Filter & Query** fields,
so only by setting the value on huma/huma.go:213 we can fix this problem
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.