jpmorganchase / py-avro-schema

Generate Apache Avro schemas for Python types including standard library data-classes and Pydantic data models.
https://py-avro-schema.readthedocs.io/
Apache License 2.0
37 stars 6 forks source link

Request: allow pydantic option to get field names by alias #53

Closed dada-engineer closed 1 year ago

dada-engineer commented 1 year ago

Hi it would be great if an option would be introduced to render the schema from a pydantic class by field aliases instead of names.

I would be happy to provide a pull request for this.

faph commented 1 year ago

Thanks! Yes that looks like a sensible enhancement. Let me review in detail on Monday.

dada-engineer commented 1 year ago

Thank you. As data classes already use the field name it is unfortunately quite pydantic specific and branded.

Anyways this project has bean a pleasure to understand. Very nice and though through code. Thanks a lot.

faph commented 1 year ago

Many thanks for this! Released as v3.1.0