danielgtaylor / danielgtaylor/huma

Feature request - request side transformer

Open
#614 3 comments 6 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
4.4k
Forks
285
Avg merge
40m
Merged PRs (30d)
1

Description

As a follow-on to https://github.com/danielgtaylor/huma/issues/289, we're seeing a need to have request-aware middleware plugged into the request processing pipeline to implement a pattern that cross-cuts all API endpoints.

The main idea is:

* Request structure matches some specific criteria (payload contains a field for instance)
* Request has additional context added to it

Right now we're doing this by wrapping the API handler functions that get setup at registration time -- but it would be better to have a well defined construct for this pattern.

Thanks in advance for considering!

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are identified; start by tracing the request-processing pipeline and the existing handler wrapping described in the issue. Define the request-aware middleware contract for matching request structure and adding context, then verify that it can apply across API endpoints with coverage for both behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.