fix(deps): update module github.com/danielgtaylor/huma/v2 to v2.24.0 #142
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.23.0
->v2.24.0
Release Notes
danielgtaylor/huma (github.com/danielgtaylor/huma/v2)
v2.24.0
Compare Source
Overview
Better Support of String Subtype Slice Params
It's now possible to use types based on
string
like you commonly see for enumerations as slice inputs to Huma operations.Better Support of non-Object Refs
Fixes a bug that prevented deliberate refs of nullable non-objects from being used due to a panic. It's now possible to do something like this to automatically add enum values from a type when generating the schema and use a
$ref
in the JSON Schema:Fix Empty Security Marshaling
The empty security object has semantic meaning in OpenAPI 3.x which enables you to override a global security setting to make one or more operations public. It's now possible to do so:
Expanded Adapter Interface
The
huma.Adapter
interface now has methods for getting the HTTP version and TLS info of the incoming request, which enables better tracing middleware using e.g. OpenTelemetry.Schema Transformers Automatically Call
schema.PrecomputeMessages()
Schema transformers may modify the schema in ways that precomputed messages & validation cache data are no longer valid. This change makes sure to recompute them if the schema has been modified, preventing potential panics.
Configurable Array Nullability
Huma v2.20.0 introduced nullable JSON Schema arrays for Go slices due to the default behavior of Go's JSON marshaler. This change resulted in some clients (e.g. Typescript) now needing to do extra checks even when the service is sure it will never return a
nil
slice. This release includes a way to change the global default Huma behavior by settinghuma.DefaultArrayNullable = false
. It is still possible to setnullable
on each field to override this behavior, but now it is easier to do so globally for those who wish to use the old (arguably less correct) behavior.Better SSE Support
This release includes some
http.ResponseController
behavior to unwrap response writers to try and get access toSetWriteDeadline
andFlush
methods on response writers. This prevents error messages from being dumped into the console and enables Gin SSE support for the first time with the Humasse
package. Most routers should Just Work ™️ with SSE now.Read-Only & Write-Only Behavior Clarification
The read and write-only behavior of Huma validation has been clarified in the docs. See https://huma.rocks/features/request-validation/#read-and-write-only to ensure it works as you expect.
What's Changed
New Contributors
Full Changelog: danielgtaylor/huma@v2.23.0...v2.24.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 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.