Update module github.com/danielgtaylor/huma to v2#71
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
renovate
Bot
force-pushed
the
renovate/github.com-danielgtaylor-huma-2.x
branch
4 times, most recently
from
January 18, 2026 18:36
ec18dee to
65e6997
Compare
renovate
Bot
force-pushed
the
renovate/github.com-danielgtaylor-huma-2.x
branch
2 times, most recently
from
January 24, 2026 17:44
bc7c6a4 to
5a66947
Compare
renovate
Bot
force-pushed
the
renovate/github.com-danielgtaylor-huma-2.x
branch
from
March 1, 2026 10:28
5a66947 to
63635f1
Compare
Contributor
Author
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
renovate
Bot
force-pushed
the
renovate/github.com-danielgtaylor-huma-2.x
branch
from
March 26, 2026 05:18
63635f1 to
6d818bd
Compare
renovate
Bot
force-pushed
the
renovate/github.com-danielgtaylor-huma-2.x
branch
3 times, most recently
from
April 7, 2026 03:37
206e560 to
e29e068
Compare
renovate
Bot
force-pushed
the
renovate/github.com-danielgtaylor-huma-2.x
branch
from
April 16, 2026 23:58
e29e068 to
7c2d6d5
Compare
renovate
Bot
force-pushed
the
renovate/github.com-danielgtaylor-huma-2.x
branch
3 times, most recently
from
May 15, 2026 13:25
a623168 to
ccbbd43
Compare
renovate
Bot
force-pushed
the
renovate/github.com-danielgtaylor-huma-2.x
branch
5 times, most recently
from
July 17, 2026 16:00
11ae670 to
f72199a
Compare
renovate
Bot
force-pushed
the
renovate/github.com-danielgtaylor-huma-2.x
branch
from
July 25, 2026 00:34
f72199a to
54f7066
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v1.14.3→v2.39.0Release Notes
danielgtaylor/huma (github.com/danielgtaylor/huma)
v2.39.0Compare Source
v2.39.0
Overview
This release adds a new framework adapter, a handful of developer-facing features, and a large batch of correctness fixes spanning SSE, the Fiber adapter, schema generation, and validation.
Echo v5 Support
The
humaechoadapter now supports Echo v5 alongside the existing versions. (#959)No More Faulty Duplicate-Schema Panics
Registering operations that use inline structs with differing field names (and an empty operation ID) previously panicked at startup on a false-positive duplicate-schema collision. Conflicting names are now auto-incremented deterministically (
Request,Request1,Request2, ...), so the app starts and the generated spec stays readable. (#893)Context Propagation to Adapters
WithContextnow propagates the context directly into the underlying adapter's own context wrapper (bun, chi, echo, fiber, gin, go, httprouter) instead of relying on a generic sub-context, so cancellation and context values flow correctly through the request lifecycle. (#867)SSE Streaming on Fiber / fasthttp
Server-Sent Events (and other streaming responses) previously failed on the Fiber adapters with
unable to flush, since fasthttp doesn't implementhttp.Flusher. SSE now streams correctly on Fiber v2 and v3 via an internal streaming hook, with no new public API andfasthttpremaining an indirect dependency. (#1059)More SSE Improvements
EventSource.onopenfires immediately rather than waiting for the first event (#1038)New Features
Schema.Constfor pinning a schema to a single allowed value (#1004)encoding.TextUnmarshalersupport for slice query parameters, matching the existing behavior for scalar params (#1021)contentType:"application/json"are now unmarshalled and validated (#1060)Validation & Schema Fixes
Application/Jsonno longer returns415(#1052)required: truein the generated spec, per the OpenAPI specification (#1011)uniqueItemsvalidation when array items are unhashable types, now returning422correctly (#1045)json:",inline"tag is now honored for embedding anonymous fields in schemas (#1006)Adapter & Robustness Fixes
EachHeaderiteration (it previously invoked the callback once per byte, breaking cookie reads) and switchedBodyReadertoBody()for automatic request-body decompression (#1058)GETsub-requests back into the generatedPATCHhandler and panicking (#1049)getAPIPrefixwhen server URLs contain template variables like{port}or{version}(#1027)Docs UI & Documentation
allow-downloadsto the Stoplight CSP so the Export button works (#1048)What's Changed
encoding.TextUnmarshalersupport for slice query parameters by @B94715 in #1021New Contributors
Full Changelog: danielgtaylor/huma@v2.38.0...v2.39.0
v2.38.0Compare Source
Overview
Fiber v3
This release adds support for Fiber v3. Dedicated v2 functions have been added to ensure support for both.
What's Changed
New Contributors
Full Changelog: danielgtaylor/huma@v2.37.3...v2.38.0
v2.37.3Compare Source
Overview
This bugfix release fixes a few minor bugs and typos from previous releases.
This also adjusts the HTTP status code returned by Huma if marshaling a response fails, from 200 to 500.
What's Changed
New Contributors
Full Changelog: danielgtaylor/huma@v2.37.2...v2.37.3
v2.37.2Compare Source
Overview
This bugfix release fixes an issue with how form data was being documented in OpenAPI.
This also fixes embedded objects with valid JSON tags being incorrectly embedded in the OpenAPI docs.
What's Changed
Full Changelog: danielgtaylor/huma@v2.37.1...v2.37.2
v2.37.1Compare Source
Overview
This bugfix release fixes an issue regarding the Swagger UI docs renderer, as well as fixes an issue preventing Groups from using the configurable options released in v2.37.1.
This also brings interface constructors to
humamux.What's Changed
Full Changelog: danielgtaylor/huma@v2.37.0...v2.37.1
v2.37.0Compare Source
Overview
Dropped Explicit IDN-Hostname Validation
This validation unintentionally imported an external library to the base Huma library. Since this was not a requested feature, it has been removed for now. The
idn-hostnameformat value has become an alias forhostnamein the meantime.Operation ID Normalization
Spaces in operation IDs get automatically converted to hyphens now.
Optimizations & Fixed Memory Leak
Various internal operations have been optimized (~7% overall improvement): #973 (comment)
A memory leak when using
MultipartFormFileshas been resolved.New Configurable Options
Allow Additional Properties By Default
A new config option has been added to allow additional properties by default. This can be set in the API config.
Fields Optional By Default
A new config option has been added to set fields to optional by default, rather than required by default. This can be set in the API config.
Strict Query Parameters
A new config option has been added to forcibly reject unknown query parameters. This can be set in the API config, or per-operation.
Framework & Dependency Updates
What's Changed
Full Changelog: danielgtaylor/huma@v2.36.0...v2.37.0
v2.36.0Compare Source
Overview
This release is larger than usual. Key changes:
Unique Operation ID Enforcement
Operation IDs are now enforced to be unique, preventing collisions in generated OpenAPI specs. (Fixes #910)
Native Docs Renderer Support
Native support for Scalar and SwaggerUI alongside the default Stoplight Elements. Configure via
config.DocsRenderer = huma.DocsRendererScalar.Expanded Content-Type Handling
Content-Typefor non-JSON endpointsContent-TypeheaderForm Handling Improvements
FormFilefieldSchema & Validation Enhancements
$schemafield reusing links for identical objectsexamplerendering in some docs renderers$schemaURL handling (with docs for disabling it)netip.Addrto support IPv6; added newipformat for v4/v6Framework & Dependency Updates
Body()instead ofBodyRaw()for automatic decompressionWhat's Changed
New Contributors
Full Changelog: danielgtaylor/huma@v2.35.0...v2.36.0
v2.35.0Compare Source
Overview
Moved this release as it was incorrectly tagged as v2.34.3.
Improved Error Messaging for Form Pointers
Pointer panic messages now explicitly include “Form” where applicable, making debugging clearer and resolving #892.
Expanded String Format Support
Added support for
durationandidn-hostnamestring formats, improving schema expressiveness and validation coverage.Header Parsing Fix
Fixed several subtle issues in header detection that occurred when output fields were slices, arrays, or maps, which could cause headers (notably []*http.Cookie) to be incorrectly applied or documented. The parsing logic now correctly inspects the root type of collection fields and adds support for hidden headers, allowing them to be excluded from generated OpenAPI documentation. These changes resolve multiple long-standing documentation and serialization bugs without introducing new behavior.
What's Changed
New Contributors
Full Changelog: https://github.com/danielgtaylor/huma/compare/v2.34.2...v2.34.3
v2.34.3Compare Source
v2.34.2Compare Source
Overview
TLS-Aware URL Scheme Detection
Huma now correctly uses the
httpsURL scheme when TLS is configured, andhttpwhen it is not. Previously, the scheme detection could be incorrect in certain scenarios.Time Wrapper Parsing Fix
Fixed an issue where time wrapper types failed to parse correctly, resolving #844.
What's Changed
New Contributors
Full Changelog: danielgtaylor/huma@v2.34.1...v2.34.2
v2.34.1Compare Source
Overview
This bugfix release fixes an issue regarding content types that was inadvertently introduced while adding a feature in v2.34.0. The previous behavior is restored while still supporting the new feature.
What's Changed
Full Changelog: danielgtaylor/huma@v2.34.0...v2.34.1
v2.34.0Compare Source
Overview
Opt-in for 406 Errors
By default, Huma will fall back to the default format when content negotiation fails to find an appropriate content type that both the client and server can agree on. This enables clients which send no
Content-Typeheader to Just Work ™️, however sometimes that behavior is not desired and you would rather return a 406 Not Acceptable. A new configuration option enables this:What's Changed
New Contributors
Full Changelog: danielgtaylor/huma@v2.33.0...v2.34.0
v2.33.0Compare Source
Overview
Minimum Go Version Upgrade
Go 1.23+ is now required, keeping to the "last two versions" approach that Go itself uses for support. Dependencies have also been upgraded, including a few dependabots for security issues.
Explicitly Set Empty Example
You can now explicitly set empty example strings:
Empty Group Path
It's now possible to use operations on a group with an empty path, having the operation use the group's path without any additions:
Adapter Context Unwrapping Fixes
You can now use
huma.WithValueandhuma.WithContextto wrap a context and the adapter-specificUnwrapfunction will no longer panic.Nested CLI Options
Nested CLI options via structs are now supported.
Results in options like
--db.host localhostand--db.port 5432.Other
Various other fixes and feature improvements. Thanks everyone!
What's Changed
New Contributors
Full Changelog: danielgtaylor/huma@v2.32.0...v2.33.0
v2.32.0Compare Source
Overview
HTTP HEAD Convenience Function
A convenience function was added for HTTP HEAD requests.
Stop HTML-Escaping JSON
HTTP API usage would rarely need to HTML-escape responses, so this default JSON marshaling behavior has been turned off. If you would like to keep the behavior, you can do so by modifying the
huma.Config.Formatsmap. For example, error messages are now more readable:expected number \u003e= 10expected number >= 10Better Integer Validation
A new validation check has been added to present a better error message to the user when an integer is required but a floating point value like
1.5is passed in. This now results in anexpected integermessage instead of a JSON unmarshal error.Groups + Convenience Function Improvements
Groups and convenience functions like
huma.Getnow play better together. Groups will regenerate the operation ID and operation summary iff those values were auto-generated and have not been modified. This works for groups of groups as well. The following are equivalent:If you prefer full control over the operation ID and summary, use
huma.Registerinstead. You can still use group operation modifiers and convenience modifiers which modify the operation ID and/or summary and, if modified, they will not get regenerated. You can also disable generation by changing or unsetting the operation's_convenience_idand_convenience_summarymetadata fields which are added by convenience functions likehuma.Get/huma.Put/etc.What's Changed
New Contributors
Full Changelog: danielgtaylor/huma@v2.31.0...v2.32.0
v2.31.0Compare Source
Overview
Go 1.24
omitzeroSupport!Huma now supports Go's new JSON
omitzerofeature out of the box, treating it similar to the existingomitemptyin terms of making fields optional. The updated rules for optional fields now look like this:omitempty, it is optional.omitzero, it is optional.required:"false", it is optional.required:"true", it is required.See https://huma.rocks/features/request-validation/#optional-required for more info.
What's Changed
New Contributors
Full Changelog: danielgtaylor/huma@v2.30.0...v2.31.0
v2.30.0Compare Source
Overview
Sponsors
A big thank you to our new sponsor:
Groups
Huma now supports groups, which port over much of the functionality from @cardinalby's excellent https://github.com/cardinalby/hureg library (thank you for that work!). This enables creating groups of operations with the same path prefixes, middleware, operation modifiers, and transformers. Typical usage might look like this:
See https://huma.rocks/features/groups/ for more details.
Context Unwrapping
Due to many user requests, it is now possible to "unwrap" a router-specific context into its constituent router-specific representation. Each adapter package now has an
Unwrap(huma.Context) Tfunction that will return either a request/response pair or that router's own context type, allowing you to effectively escape Huma in router-agnostic middleware & resolvers.Example usage:
While generally not recommended, this can help you to use router-specific middleware as you migrate large existing projects to Huma, or just escape Huma's abstractions when they no longer make sense for your use-case. Sometimes the best library is the one that gets out of the way.
See https://huma.rocks/features/middleware/#unwrapping for more details.
What's Changed
New Contributors
Full Changelog: danielgtaylor/huma@v2.29.0...v2.30.0
v2.29.0Compare Source
Overview
Support More Multipart Form Values
This enabled the use of fields with arbitrary types in the form which will get parsed & validated for you:
Better Auto-patch Support with Sub-routers
The auto-patch functionality now tries to find a common path prefix so it's possible to do stuff like this and have the generated
PATCHoperation function correctly:Custom Param Type Enhancements
Two new interfaces enable some additional advanced customization enhancements when creating operation input parameters:
These can be used like so:
Fix Panic from External Schema
It's possible to use the default schema transformers now with custom external schemas without causing a panic. For example:
Note: external schemas are not validated and are just there for informational purposes and to help with client generation.
Fiber Fixes
A major rework of the
humafiberadapter was done in #725. This ensures tests are run with the-racedetector and fixes a race that was present in the Fiber adapter. It should be much more stable now.Deep Object Support for Params
Params now support the OpenAPI
deepObjectstyle, enabling e.g. query params to send structured input in that style.