Repository navigation
fix(deps): update module github.com/danielgtaylor/huma/v2 to v2.40.0 - #15
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Contributor
Author
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
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:
v2.39.1→v2.40.0Release Notes
danielgtaylor/huma (github.com/danielgtaylor/huma/v2)
v2.40.0Compare Source
Overview
This release adds native support for stdlib UUIDs, cuts compile times for large APIs, and brings a big batch of correctness fixes across request limits, defaults, validation, and the Fiber adapter. It also raises the minimum Go version to 1.26 and includes a few intentional breaking changes, so please read the upgrade notes below.
Upgrade Notes
RawBodyoperations (e.g.[]byteuploads) now get the same default 1 MiBMaxBodyBytesand 5sBodyReadTimeoutas regular bodies. Endpoints accepting larger or slower raw uploads should set these explicitly (-1for unlimited) (#1095)MaxBodyBytes. An explicitly setMaxBodyBytesis now enforced on multipart requests. Multipart remains exempt from the defaults, so existing uploads keep working unless you've set a limit (#1094)defaulttags panic at startup. For example,int8withdefault:"128"previously wrapped silently to-128; it now fails at registration (#1142)int8withmaximum:"500".int8,int16,uint8anduint16fields also now advertiseminimum/maximumfrom their Go type, so generated specs will change (#1143)Security Fix
A malformed
Acceptheader such asapplication/json;,bcaused a panic during content negotiation. On net/http-based adapters this dropped the request; on Fiber, which doesn't recover handler panics unless therecovermiddleware is used, it crashed the server process. This affects v2.26.0 onwards, so upgrading is recommended. (#1128)Native Stdlib UUIDs
On Go 1.27+, fields using the new standard library
uuid.UUIDtype are automatically documented astype: stringwithformat: uuid, with no struct tag needed. (#1051)Faster Compile Times
huma.Register,sse.Registerand the convenience helpers (huma.Get,huma.Post, ...) now keep their generic parts tiny, so Go no longer compiles a full copy of the registration logic for every input/output pair. In a 200-operation benchmark package, build time dropped from 3.38s to 0.64s. There are no API or runtime changes. (#1115, #1117)New Features
sse.Message.IDString, for UUIDs, cursor tokens and other opaque IDs (#1086)Schemacan be unmarshalled from JSON, including$ref,x-extensions and nullable types, and is ready forValidateonce decoded (#1144)Validation & Defaults Fixes
{"type": "null"}is now validated. Previously it accepted any value, so ananyOfwith a null branch skipped the constraints of its other branches (#1120)300into anint8) now return422instead of silently wrapping (#1096)defaulttags onencoding.TextUnmarshalertypes (e.g. a duration withdefault:"10s") are now applied viaUnmarshalTextinstead of panicking (#1126)default:"[\"a\",\"b\"]"(#1125)?flag&foo=bar) are now detected correctly (#1097)PathBuffer.Poprestores the exact offset, fixing wrong error locations after discriminator errors (#1136)casing.Camelandcasing.Joinno longer panic or double-apply transforms when a transform removes a part (#1113)Request Body Fixes
MaxBodyBytesis now accepted instead of returning413(#1131)OpenAPI Fixes
RawBodyalongsideBodyno longer documents an extraapplication/octet-streammedia type (#1134)exampletag on aBodyfield is now set as the media type example, since many tools ignore examples next to a$ref(#1101)Adapter & Autopatch Fixes
Set-Cookieheaders are now sent as separate header lines instead of being comma-joined (#1137)Host(#1140)$refs are resolved when making the PUT schema optional (#1080)Docs UI & Documentation
'unsafe-eval'in its CSP, and its fonts now load (#1145)persistAuthorizationto theDocsRendererConfigexample (#1122)What's Changed
New Contributors
Full Changelog: danielgtaylor/huma@v2.39.1...v2.40.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.