Skip to content
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

Simplify and fix DecimalAnnotation #738

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

gsakkis
Copy link
Contributor

@gsakkis gsakkis commented Oct 11, 2023

While pydantic uses pydantic-core internally to handle validation and serialization, it is a new API for Pydantic V2, thus it is one of the areas most likely to be tweaked in the future and you should try to stick to the built-in constructs like those provided by annotated-types, pydantic.Field, or BeforeValidator and so on.

@roman-right
Copy link
Member

Hi! Thank you for the PR. It will be merged by the end of the week with others.

@roman-right roman-right merged commit 060e016 into BeanieODM:main Oct 12, 2023
20 of 21 checks passed
@roman-right
Copy link
Member

Merged. It will be published by the end of this week with others

@gsakkis gsakkis deleted the fix-decimal-annotation branch October 21, 2023 20:30
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.

[BUG] Fields of type DecimalAnnotation are serialized to json as type number and deserialized as type float
2 participants