Happy-Kunal / pydantic2avro

Generate Apache Avro schemas for Pydantic data models.
https://pypi.org/project/pydantic2avro/
MIT License
0 stars 0 forks source link

Add better support for `pydantic.networks` #4

Open Happy-Kunal opened 3 months ago

Happy-Kunal commented 3 months ago

As of now, pydantic2avro is crashing for most of the types in pydantic.networks, except for pydantic.networks.EmailStr. We can patch it quickly in about 5 minutes, but for a more elegant and reliable solution, we'll need to dive deeper. The idea is to include the specific type from pydantic.networks (like pydantic.networks.PostgresDsn) in the Avro schema as extra info. This approach will take a bit more experimentation, but it promises a more robust fix in the long run and can provide more insights to the reader of auto generated Avro schemas for debugging purposes.

Tasks: