这是indexloc提供的服务,不要输入任何密码
Skip to content
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