Skip to content

docs(event_handler): add section about Pydantic serialization #7049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2025

Conversation

leandrodamascena
Copy link
Contributor

@leandrodamascena leandrodamascena commented Jul 28, 2025

Issue number: #6728

Summary

This PR addresses issue #6728 by adding comprehensive documentation about Pydantic serialization behavior when using Event Handler with validation enabled.

Changes

Documentation Updates

  • Added new section "Pydantic serialization behavior" in the Event Handler documentation
  • Explains that Pydantic models are serialized using by_alias=True by default when enable_validation=True
  • Clarifies the difference from Pydantic's default behavior (by_alias=False)

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

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 July 28, 2025 11:09
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Jul 28, 2025
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 28, 2025
Copy link

codecov bot commented Jul 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.27%. Comparing base (5999346) to head (8a321a8).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7049   +/-   ##
========================================
  Coverage    96.27%   96.27%           
========================================
  Files          275      275           
  Lines        12912    12912           
  Branches       954      954           
========================================
  Hits         12431    12431           
  Misses         376      376           
  Partials       105      105           

☔ 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.

@leandrodamascena leandrodamascena self-assigned this Jul 28, 2025
@leandrodamascena leandrodamascena linked an issue Jul 28, 2025 that may be closed by this pull request
Copy link

@leandrodamascena leandrodamascena merged commit d017744 into develop Jul 28, 2025
15 checks passed
@leandrodamascena leandrodamascena deleted the doc/improve-docs branch July 28, 2025 12:23
@dehanjl
Copy link

dehanjl commented Jul 28, 2025

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Pydantic objects always serialized using alias
3 participants