Skip to content

openapi3filter: skip schema checks for empty allowEmptyValue strings - #1228

Merged
fenollp merged 1 commit into
getkin:masterfrom
snowyukitty:fix/empty-allowemptyvalue-format
Jul 19, 2026
Merged

fenollp merged 1 commit into
getkin:masterfrom
snowyukitty:fix/empty-allowemptyvalue-format

Conversation

@snowyukitty

Copy link
Copy Markdown
Contributor

Fixes #1134.

#1096 stopped turning empty string params into nil, so format validation still fires on values like dateOfBirth= even when allowEmptyValue is true. Skip schema checks in that case.

Regression in openapi3filter/issue1134_test.go.

getkin#1096 made parsePrimitive return empty string for string types instead of
nil. Format and other schema checks then still ran when allowEmptyValue
was set. Skip those checks for empty strings when allowEmptyValue is true.

Fixes getkin#1134.
@fenollp
fenollp merged commit 0fb1f0e into getkin:master Jul 19, 2026
5 checks passed
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.

Format validation is being performed on empty strings

2 participants