(b *testing.B)
| 150 | } |
| 151 | |
| 152 | func BenchmarkRegister(b *testing.B) { |
| 153 | _, api := humatest.New(b, huma.DefaultConfig("Test API", "1.0.0")) |
| 154 | |
| 155 | b.ResetTimer() |
| 156 | b.ReportAllocs() |
| 157 | for i := 0; i < b.N; i++ { |
| 158 | huma.Register(api, huma.Operation{ |
| 159 | Method: http.MethodPost, |
| 160 | Path: fmt.Sprintf("/test-%d", i), |
| 161 | }, func(ctx context.Context, input *ComplexInput) (*ComplexOutput, error) { |
| 162 | return nil, nil |
| 163 | }) |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | type ComplexInput struct { |
| 168 | ID string `path:"id"` |
nothing calls this directly
no test coverage detected
searching dependent graphs…