Skip to content

fix: deserialization in pydantic#2311

Merged
jonaslagoni merged 1 commit intoasyncapi:masterfrom
412b:fix-pydantic-deserialization
Jul 26, 2025
Merged

fix: deserialization in pydantic#2311
jonaslagoni merged 1 commit intoasyncapi:masterfrom
412b:fix-pydantic-deserialization

Conversation

@412b
Copy link
Contributor

@412b 412b commented Jul 24, 2025

when doing deserialization in pydantic only unknown properties must be added to additional_properties

Description

current generated code contains a bug, which leads to matched fields appearing in additional_properties.
the fix is pretty trivial and straight-forward: we only process unknown properties.

Related Issue

it seemed to not worth creating one for such a trivial fix.

Checklist

  • The code follows the project's coding standards and is properly linted (npm run lint).
  • Tests have been added or updated to cover the changes.
  • Documentation has been updated to reflect the changes.
  • All tests pass successfully locally.(npm run test).

Additional Notes

when doing deserialization in pydantic only unknown properties must be added to additional_properties
@netlify
Copy link

netlify bot commented Jul 24, 2025

Deploy Preview for modelina canceled.

Name Link
🔨 Latest commit 80ef183
🔍 Latest deploy log https://app.netlify.com/projects/modelina/deploys/688226393a80200008f1792b

@sonarqubecloud
Copy link

@coveralls
Copy link

Pull Request Test Coverage Report for Build 16496805573

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.558%

Totals Coverage Status
Change from base Build 16430798089: 0.0%
Covered Lines: 6598
Relevant Lines: 6992

💛 - Coveralls

@412b
Copy link
Contributor Author

412b commented Jul 25, 2025

@jonaslagoni can you please take a look at this one, when you have time?

Copy link
Member

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

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

Thanks @412b 👍

@jonaslagoni jonaslagoni merged commit 3488549 into asyncapi:master Jul 26, 2025
25 checks passed
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 5.3.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@412b 412b deleted the fix-pydantic-deserialization branch August 14, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants