danielgtaylor / danielgtaylor/humaclient
Add support for different encoding/decoding options supported by Huma
- Dominant language
- Go
- Stars
- 7
- Forks
- 3
- Avg merge
- 3h 13m
- Merged PRs (30d)
- 1
Description
It'd be great if humaclient supported pluggable codecs, similar to Huma itself. One of the reasons I'm looking at Huma is because it's powerful, but not so opinionated that you couldn't use it for RPC.
One way I'm hoping to use Huma is with tinylib's mgsp tool for extremely fast and resource-light serialization and deserialization of input and output. The biggest barrier to that has been that I'd need to write clients by hand, or generate them from OpenAPI specs, which for Go seem to always end up not being very idiomatic or particularly nice to work with. Whereas humaclient looks very ergonomic and integrates well with Huma (no surprise).
Maybe some of this could be customisable by default by passing some options to `humaclient.Register` before it's generated, but also it could be customisable on client instantiation by passing in some options variadic options to `New` or `NewWithClient` (though, I do think `NewWithClient` could potentially also be covered by `New(baseURL, WithHTTPClient(client))` potentially).
(I don't mean for that title to sound like a command! Just trying to fit in with the other issues' naming style)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing humaclient.Register, New, and NewWithClient entry points named in the issue, along with how generated clients currently encode and decode requests and responses. Define where codec options belong and what Huma-supported alternatives must work; the change is done when generated clients can use pluggable codecs through the agreed configuration paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100