Skip to content

fix(event_handler): preserve commas in scalar query and header parameters - #8509

Open
leandrodamascena wants to merge 1 commit into
developfrom
fix/openapi-scalar-commas-8508
Open

leandrodamascena wants to merge 1 commit into
developfrom
fix/openapi-scalar-commas-8508

Conversation

@leandrodamascena

Copy link
Copy Markdown
Contributor

Issue number: closes #8508

Summary

Changes

Restores scalar query and header strings that event normalization split on commas before OpenAPI validation. Preserves sequence handling and distinguishes actual repeated parameters using each event's representation, including ALB URL decoding.

User experience

With validation enabled, ?search=hello,world now reaches a str handler parameter intact instead of returning 422. Scalar fields in query models also retain the full value instead of silently receiving "hello". Headers such as X-Forwarded-For preserve the complete chain.

Body normalization is unchanged.

Validation

  • 194 new regression cases across six resolvers.
  • Event Handler and event data class suites: 1,328 passed and one existing skip on each of Python 3.10 and 3.14.
  • Ruff, mypy, Bandit baseline, Xenon, and applicable pre-commit hooks passed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@leandrodamascena
leandrodamascena requested a review from a team as a code owner October 1, 2026 03:54
@powertools-for-aws-oss-automation powertools-for-aws-oss-automation Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 1, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.89%. Comparing base (b1af7e8) to head (f89cba1).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8509      +/-   ##
===========================================
+ Coverage    96.88%   96.89%   +0.01%     
===========================================
  Files          317      317              
  Lines        15899    15920      +21     
  Branches      1395     1400       +5     
===========================================
+ Hits         15403    15425      +22     
+ Misses         361      360       -1     
  Partials       135      135              

☔ View full report in Codecov by Harness.
📢 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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

event_handlers size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: OpenAPI validation rejects or truncates query and header values that contain commas

1 participant