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
[ ] Code follows coding conventions held in this repo
[ ] Automated tests have been added
[ ] Tests are passing
[ ] Docs have been updated (if applicable)
[ ] Temporary settings (e.g. variables used during development and testing) have been reverted to defaults
How to test
Build updated version of SDK and add reference to Kontent.Ai.Delivery.Abstractions dll
Try generating models from a project that contains content type with DateTime element and verify it contains DisplayTimezone property with correct attributes (DisplayTimzoneConverterAttribute and JsonPropertyAttribute("<elementCodename>"))
Try using these new models with new SDK version and verify that it consumes items correctly
Try using updated SDK version with old models and verify this change is backwards-compatible
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
Kontent.Ai.Delivery.Abstractions
dllDisplayTimzoneConverterAttribute
andJsonPropertyAttribute("<elementCodename>")
)