Go API client for Huma. It's generated with oapi-codegen
clientIdclientSecret
go get github.com/valuetechdev/huma-goimport "github.com/valuetechdev/huma-go"
func yourFunc() error {
client := huma.New(huma.ClientCredentials{
ClientId: "your-id",
ClientSecret: "your-secret",
})
res, err := client.ListUsersWithResponse(context.Background(), &huma.ListUsersParams{})
if err != nil {
return fmt.Errorf("failed to search for users: %w", err)
}
// Do something with res
return nil
}- We convert the original Huma API from OpenAPI 3.1 to OpenAPI 3.0 with OpenAPI Overlay.
- We alter a lot of the
operationIdin the original spec for readability inoverlay.yaml