shuttle-hq / synth

The Declarative Data Generator
https://www.getsynth.com/
Apache License 2.0
1.39k stars 109 forks source link

Date/Times should not be subtypes of string #174

Closed brokad closed 3 years ago

brokad commented 3 years ago

Currently date_time is a subtype of strings.. This is for historical reasons because we used to only support generating JSON, which does not know date times as anything else other than strings.

Nowadays, we generate into databases as well, which have first-class support for more primitive types (incl. date times) than JSON does. So we made internally the date_time nodes generate chrono::DateTime and format separately. But date_time is still a subtype of string, which is not the best UX.

This is to simply move the content::string::DateTime node to be a content::Content variant of its own right, with its value of type like "type": "date_time".