litestar icon indicating copy to clipboard operation
litestar copied to clipboard

fix: duplicate query parameters fail validation if one of the paramaters is a list

Open cstarkers opened this issue 5 months ago • 2 comments

Description

Allow a single query parameter to be aliased to multiple Python parameters, even when one of the Python parameters is a list.

Previously, if a query paramater was remapped to multiple different Python paramenters by using Parameter(query="alias") and one of the Python parameters was a list, a validation error was raised. This was inconsisent with how non-list query parameters worked.

Fixes #4242

cstarkers avatar Nov 12 '25 10:11 cstarkers

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 97.83%. Comparing base (07ce57a) to head (fc63a51). :warning: Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4469   +/-   ##
=======================================
  Coverage   97.83%   97.83%           
=======================================
  Files         296      296           
  Lines       15301    15311   +10     
  Branches     1715     1714    -1     
=======================================
+ Hits        14970    14980   +10     
  Misses        189      189           
  Partials      142      142           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 12 '25 10:11 codecov[bot]

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/4469

github-actions[bot] avatar Nov 12 '25 10:11 github-actions[bot]

Looks good in general, but I think this should take into account header parameters as well. The same semantics should apply there as well

Cool, done now

I also refactored some stuff as MultiDict, which I can imagine having a perf impact (probably positive, Multidict should be fast, but who knows, it could be negative)

Is there a performance testing suite/metrics for Litestar?

cstarkers avatar Dec 17 '25 08:12 cstarkers