Commit 81146a3
Add missing required parameter detection
Closes: #134
The exploded form path bound struct-typed query params (e.g. types.Date,
time.Time) via bindParamsToExplodedObject and returned nil when no fields
were present, dropping the required check that the slice and primitive
cases already perform. A missing required date param therefore passed
silently instead of returning a RequiredParameterError.
Honor required in the reflect.Struct case of both
BindQueryParameterWithOptions and BindRawQueryParameter, and add
regression tests for the absent-required case.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 2755f15 commit 81146a3
2 files changed
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
479 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
480 | 486 | | |
481 | 487 | | |
482 | 488 | | |
| |||
707 | 713 | | |
708 | 714 | | |
709 | 715 | | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
710 | 719 | | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
711 | 723 | | |
712 | 724 | | |
713 | 725 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
547 | 567 | | |
548 | 568 | | |
549 | 569 | | |
| |||
0 commit comments