kontent-ai / model-generator-net

Kontent.ai .NET model generator.
https://www.nuget.org/packages/Kontent.Ai.ModelGenerator
MIT License
17 stars 19 forks source link

Generate DisplayTimezone for DateTime elements with required attributes #166

Closed milan009 closed 1 year ago

milan009 commented 1 year ago

Motivation - sanity check review

Implementing DateTimeElement DisplayTimezone support for DAPI model generation alongside support in SDK PR

Inspiration taken from PropertyValueConverters in SDK tests. Implemented converter that maps TZ value from DateTime into a property in model that is decorated with target element codename and the converter attribute. The PR cannot currently be merged/built and requires referencing locally built updated version of the SDK. If we decide to go with this approach, a new version of SDK nuget package has to be referenced.

Checklist

How to test

Sevitas commented 1 year ago

Thanks for the PR, I'll look into it.