dbt-labs / hologram

A library for automatically generating Draft 7 JSON Schemas from Python dataclasses
MIT License
9 stars 13 forks source link

Changes to support integrating mashumaro into dbt core #41

Closed gshank closed 3 years ago

gshank commented 3 years ago

The class variables starting with underscore had to be explicitly marked as ClassVar in order to get Mashumaro to skip them. I had to create an overridable '_local_to_dict' function so that '_encode_field' would work for both Hologram and Mashumaro.

This also includes getting caching of fields to work for performance reasons.