FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add missing required parameter detection by mromaszewicz · Pull Request #135 · oapi-codegen/runtime · GitHub

Add missing required parameter detection - #135

Merged
mromaszewicz merged 1 commit into
oapi-codegen:mainfrom
mromaszewicz:fix/issue-134
Jun 20, 2026
Merged

Add missing required parameter detection#135
mromaszewicz merged 1 commit into
oapi-codegen:mainfrom
mromaszewicz:fix/issue-134

Conversation

Copy link
Copy Markdown
Member

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.

Closes: oapi-codegen#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>
mromaszewicz requested a review from a team as a code owner June 20, 2026 06:05
mromaszewicz added the bug Something isn't working label Jun 20, 2026
mromaszewicz merged commit 7afeea8 into oapi-codegen:main Jun 20, 2026
14 checks passed
mromaszewicz deleted the fix/issue-134 branch June 20, 2026 06:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Required not enforced for struct-typed query params (e.g. date)

1 participant


Back | FazBrowse Home | New Git URL