We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Custom types are not honored with certain Field constraints.
from pydantic import Field from dataclasses_avroschema.pydantic import AvroBaseModel from dataclasses_avroschema.types import Int32 class A(AvroBaseModel): a: Int32 class B(AvroBaseModel): b: Int32 = Field(ge=0) print(A.avro_schema()) print(B.avro_schema())
which outputs
{"type": "record", "name": "A", "fields": [{"name": "a", "type": "int"}]} {"type": "record", "name": "B", "fields": [{"name": "b", "type": "long"}]}
where B's type is long and not int as I would expect.
long
int
The text was updated successfully, but these errors were encountered:
fix: custom types with extra annotation. Closes #598
f322528
2766f1f
marcosschroh
No branches or pull requests
Describe the bug
Custom types are not honored with certain Field constraints.
which outputs
where B's type is
long
and notint
as I would expect.The text was updated successfully, but these errors were encountered: