Skip to content

chore(deps): bump github.com/danielgtaylor/huma/v2 from 2.40.0 to 2.41.0 - #44

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/danielgtaylor/huma/v2-2.41.0
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/danielgtaylor/huma/v2-2.41.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 23, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/danielgtaylor/huma/v2 from 2.40.0 to 2.41.0.

Release notes

Sourced from github.com/danielgtaylor/huma/v2's releases.

v2.41.0

Overview

This release adds an optional MCP package for exposing Huma operations as Model Context Protocol tools, closes a gap where request body values could skip schema validation, and makes Register dramatically faster for models that reference each other. It also includes a few behavior changes, so please read the upgrade notes below.

Upgrade Notes

  • JSON bodies with duplicate object keys now return 400. Previously {"a":1,"a":2} was accepted. This only applies to bodies decoded with the default JSON format (#1172)
  • CBOR field names are now matched case-sensitively and duplicate map keys are rejected. A CBOR key such as Source no longer populates a source field (#1172)
  • Pointers to string-typed arrays are now nullable in the spec. Fields such as *uuid.UUID, *net.IP and *[]byte now render as ["string", "null"], so generated specs and clients may change (#1157)
  • tokenUrl is omitted when empty. Implicit OAuth flows no longer emit "tokenUrl": "", which the OpenAPI schema rejects (#1170)

Request Validation Fix

Request bodies could carry values that were never validated. encoding/json assigns case-variant keys ("Role" for a role field) and merges duplicate object keys, while validation only checked one key per property and the last duplicate. Constraints such as enum, pattern, maximum or maxLength could be skipped this way. Every case variant is now validated against its property, duplicate keys are rejected, and the CBOR format decodes the same keys validation checks. Upgrading is recommended. Custom JSON or CBOR formats should likewise reject duplicate keys and match field names the way validation does. (#1172)

MCP Tools

The new optional mcp package serves your operations as Model Context Protocol tools over Streamable HTTP. Tool calls are replayed through the API's own router, so validation, middleware and auth apply unchanged. See the new docs page under Extra Packages and examples/mcp-auth. (#1171)

Faster Registration

Register no longer walks every path through an input's type graph, which grew exponentially when models referenced each other through more than one field. For example, a 22-level input with two pointers per level went from 3.06s and 7.7 GiB to 107µs and 152 KiB. Per-request performance is unchanged. (#1165)

Fixes

  • autopatch: generated PATCH responses now keep every value of multi-value headers such as Set-Cookie and Link, instead of only the last (#1166)
  • humafiber: ServeHTTP no longer times out after one second or panics on errors, which brought the server down when an autopatch PUT handler was slow. Errors now return a 500 (#1152)
  • casing.LowerCamel returns an empty string for empty or separator-only input instead of panicking (#1151)

Documentation

  • Documented humatest.Wrap for testing adapter-specific middleware (#1154)
  • Fixed the humacli options example to use the doc struct tag rather than help (#1156)

Internal

  • Applied go fix modernizations for Go 1.26, with no behavior changes (#1153)

What's Changed

New Contributors

Full Changelog: danielgtaylor/huma@v2.40.0...v2.41.0

Commits
  • 1177820 chore: bump dependencies and fix MCP docs rendering (#1173)
  • 2951860 fix(autopatch): keep every value of multi-value headers (#1166)
  • 40fd098 fix: validate the same body keys the decoder assigns (#1172)
  • 5c9ee6d feat(mcp): expose Huma operations as MCP tools (#1171)
  • 61c334f fix: omit empty tokenUrl from OAuth flows (#1170)
  • 51b0840 fix: stop findInType walking every path through the type graph (#1165)
  • 606bcc2 docs: rename help tag to doc in humacli options (#1156)
  • a2fa2a1 fix(schema): keep nullability for pointers to string-typed arrays (#1157)
  • dcdadba docs: show humatest.Wrap for adapter-specific middleware (#1154)
  • cdd3351 fix(casing): return an empty string from LowerCamel for empty input (#1151)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/danielgtaylor/huma/v2](https://github.com/danielgtaylor/huma) from 2.40.0 to 2.41.0.
- [Release notes](https://github.com/danielgtaylor/huma/releases)
- [Commits](danielgtaylor/huma@v2.40.0...v2.41.0)

---
updated-dependencies:
- dependency-name: github.com/danielgtaylor/huma/v2
  dependency-version: 2.41.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1b0da5e8-0e3a-4307-b053-6cec4ac0e785

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants