这是indexloc提供的服务,不要输入任何密码
Skip to content

fix docs pointer #735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/docs/features/request-inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ huma.Register(api, huma.Operation{
Method: http.MethodPost,
Path: "/text",
Summary: "Example to post plain text input",
}, func(ctx context.Context, input struct {
}, func(ctx context.Context, input *struct {
RawBody []byte `contentType:"text/plain"`
}) (*struct{}, error) {
fmt.Println("Got input:", input.RawBody)
Expand All @@ -139,7 +139,7 @@ huma.Register(api, huma.Operation{
Method: http.MethodPost,
Path: "/upload",
Summary: "Example to upload a file",
}, func(ctx context.Context, input struct {
}, func(ctx context.Context, input *struct {
RawBody multipart.Form
}) (*struct{}, error) {
// Process multipart form here.
Expand Down Expand Up @@ -256,7 +256,7 @@ huma.Register(api, huma.Operation{
Method: http.MethodGet,
Path: "/things",
Summary: "Get a filtered list of things",
}, func(ctx context.Context, input struct {
}, func(ctx context.Context, input *struct {
// Embed both structs to compose your input.
AuthParam
PaginationParams
Expand Down
Loading