Skip to content

Conversation

@mike-zorn
Copy link

Resolves #146.

Check the item against the enum definition when validating arrays of query parameters. Previously, the unparsed query parameter value was used. This was problematic for non-exploded-form-style-arrays. In that case, validation errors would be thrown for correct requests. For example, if you accept only cod and haddock, and the parameter is set to cod,haddock, it'd test cod,haddock instead of cod and haddock.

Mike Zorn added 2 commits May 6, 2025 09:16
Only validate enums based on the provided item vs. the unparsed value.
@codecov
Copy link

codecov bot commented May 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.60%. Comparing base (0862ed8) to head (5cb576a).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #147   +/-   ##
=======================================
  Coverage   96.60%   96.60%           
=======================================
  Files          32       32           
  Lines        3391     3391           
=======================================
  Hits         3276     3276           
  Misses        115      115           
Flag Coverage Δ
unittests 96.60% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@daveshanley daveshanley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. thank you for your contribution.

@daveshanley daveshanley merged commit 7a8d2ca into pb33f:main May 17, 2025
4 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.

Spurious parameter validation errors for non-exploded arrays of string enums

2 participants