Skip to content

openapi3filter: regression test for empty query param with default - #1254

Closed
AliaksandrKhalupka wants to merge 3 commits into
getkin:masterfrom
AliaksandrKhalupka:test/empty-query-default-duplicate
Closed

AliaksandrKhalupka wants to merge 3 commits into
getkin:masterfrom
AliaksandrKhalupka:test/empty-query-default-duplicate

Conversation

@AliaksandrKhalupka

Copy link
Copy Markdown

See issue ...

Adds a regression test for optional query parameters sent with an empty value when the schema defines a default.
Repro: GET /test?flag= with type: boolean, default: false
Expected (commented in test): req.URL.Query()["flag"] is ["false"]
Current behaviour (asserted until fixed): ["", "false"] — default injection uses q.Add without removing the existing empty value.

Document expected behaviour with XXX not yet fixed, matching issue733_test.go.
When fixed, uncomment the expected assertion and remove the current one.

Co-authored-by: Cursor <cursoragent@cursor.com>
@fenollp

fenollp commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

Closing in favor of #1274

@fenollp fenollp closed this Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants