Repository: shuttle-hq/synth (language: rust)

Issue:
bug: update `date_time` examples
**Describe the bug**
Similar to #257, the use of the `date_time` is broken for the playground examples on the website.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to the [examples](https://www.getsynth.com/#snippets) on the website
2. Click "Run" for the "Time series data" or "Event logs data" example

**Expected behavior**
The output should update like it does for the "Relational data" example

**Additional context**
Inspecting the page and viewing the network logs shows the playground returned the following error:
```
"unknown variant `date_time`, expected one of `pattern`, `faker`, `categorical`, `serialized`, `uuid`, `truncated`, `sliced`, `format`, `constant` at line 24 column 1"
```

This is because of the update in #184 

bug: update `date_time` examples
**Describe the bug**
Similar to #257, the use of the `date_time` is broken for the playground examples on the website.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to the [examples](https://www.getsynth.com/#snippets) on the website
2. Click "Run" for the "Time series data" or "Event logs data" example

**Expected behavior**
The output should update like it does for the "Relational data" example

**Additional context**
Inspecting the page and viewing the network logs shows the playground returned the following error:
```
"unknown variant `date_time`, expected one of `pattern`, `faker`, `categorical`, `serialized`, `uuid`, `truncated`, `sliced`, `format`, `constant` at line 24 column 1"
```

This is because of the update in #184 



Discussion / hints:
Maybe it's about time we add an automated step to run all the documentation examples and fail if any of them cannot be processed (as per above).
Interesting idea :thinking: If we are lucky then we can maybe just run all *.json files through `synth generate`... but probably very unlikely
Maybe it's about time we add an automated step to run all the documentation examples and fail if any of them cannot be processed (as per above).
Interesting idea :thinking: If we are lucky then we can maybe just run all *.json files through `synth generate`... but probably very unlikely

Fix patch:
diff --git a/docs/blog/2021-03-08-mern.md b/docs/blog/2021-03-08-mern.md
index d90e42c6..19e5e44f 100644
--- a/docs/blog/2021-03-08-mern.md
+++ b/docs/blog/2021-03-08-mern.md
@@ -298,6 +298,12 @@ The `time` field has been correctly detected as an array of values. First of all
 }
 ```
 
+:::caution
+
+`date_time` is now a generator on its own and is no longer a subtype of the `string` generator
+
+:::
+
 ### Name
 
 Finally, the movie name field should be populated with realistic looking movie names.
diff --git a/docs/blog/2021-08-31-seeding-databases-tutorial.md b/docs/blog/2021-08-31-seeding-databases-tutorial.md
index 15d8b1b4..7287abe0 100644
--- a/docs/blog/2021-08-31-seeding-databases-tutorial.md
+++ b/docs/blog/2021-08-31-seeding-databases-tutorial.md
@@ -592,7 +592,7 @@ together in one object. For that we need the [`object`][synth-object] type:
 
 Now we have everything we need to finish writing down
 our [`User` model](#prisma-is-awesome) as a `synth` schema. A quick lookup of
-the [documentation pages][synth-datetime] will tell us how to generate
+the [documentation pages][synth-string] will tell us how to generate
 the `createdAt` and `nickname` fields.
 
 Here is the finished result for our `User.json` collection:
@@ -630,6 +630,12 @@ Here is the finished result for our `User.json` collection:
 }
 ```
 
+:::caution
+
+[`date_time`][synth-datetime] is now a generator on its own and is no longer a subtype of the `string` generator
+
+:::
+
 ### Making sure our constraints are satisfied
 
 Looking back at the [`User` model](#prisma-is-awesome) we started from, there's
@@ -717,6 +723,12 @@ Here is the end result:
 }
 ```
 
+:::caution
+
+[`date_time`][synth-datetime] is now a generator on its own and is no longer a subtype of the `string` generator
+
+:::
+
 It all looks pretty similar to the `User.json` collection, except for one
 important difference at the line
 
@@ -838,7 +850,7 @@ community would be happy to help if you encounter an issue!
 
 [synth-modifiers]: /docs/content/modifiers
 
-[synth-datetime]: /docs/content/string#date_time
+[synth-datetime]: /docs/content/date-time
 
 [synth-optional]: /docs/content/modifiers#optional
 
diff --git a/docs/docs/content/index.md b/docs/docs/content/index.md
index 33d869e9..486a9db9 100644
--- a/docs/docs/content/index.md
+++ b/docs/docs/content/index.md
@@ -21,7 +21,6 @@ various classes of string:
   * [pattern](string#pattern) takes a regular expression and
   generates matching strings
   * [uuid](string#uuid) generates hyphenated UUIDs
-  * [date_time](string#date_time) generates dates and times,
   optionally with time zone
   * [faker](string#faker) has a large number of generators for names,
   contact information, credit card numbers, sentences, and much more
@@ -33,6 +32,7 @@ various classes of string:
   within length limits
   * [categorical](string#categorical) is like a
   [one_of](one-of) specialized for strings
+* [date_time](date-time) generates dates and times
 * [object](object) creates an object with string keys containing
 generators for the values
 * [array](array) fills an array of the given length with elements of
diff --git a/docs/docs/examples/bank.md b/docs/docs/examples/bank.md
index bbd35821..7e9f1fd4 100644
--- a/docs/docs/examples/bank.md
+++ b/docs/docs/examples/bank.md
@@ -46,7 +46,7 @@ application testing.
 We first create a new workspace to import our dataset into Synth:
 
 ```bash
-mkdir synth_workspace && cd synth_workspace && synth init
+mkdir synth_workspace && cd synth_workspace
 ```
 
 Synth supports importing from JSON files. To create a namespace, copy the JSON blob below to a file outside your workspace and use the `import` command:
@@ -163,10 +163,9 @@ At this stage, we can run the `tree` command to see how the `synth import` sub-c
 ```bash
 $ tree -a
 .
-├── bank_db
-│   ├── transactions.json
-│   └── users.json
-└── .synth
+└── bank_db
+    ├── transactions.json
+    └── users.json
 ```
 
 The directory `bank_db` (remember from [Core Concepts](../getting_started/core-concepts) a subdirectory in a workspace represents a
@@ -176,7 +175,7 @@ We can now generate data from our namespace using the `synth generate` sub-comma
 into [`jq`](https://stedolan.github.io/jq/download/) for the auto-formatting but this is optional.)
 
 ```bash
-synth generate bank_db/ | jq
+synth generate bank_db | jq
 {
   "transactions": [
     {
diff --git a/docs/docs/getting_started/hello-world.md b/docs/docs/getting_started/hello-world.md
index b2f264f2..5cd4d1ff 100644
--- a/docs/docs/getting_started/hello-world.md
+++ b/docs/docs/getting_started/hello-world.md
@@ -44,7 +44,7 @@ data.
 Finally, run
 
 ```bash
-synth generate hello_synth/
+synth generate hello_synth
 ```
 
 and you should see an output very close to the output of the snippet.
@@ -55,7 +55,6 @@ and you should see an output very close to the output of the snippet.
 * For more complex real life examples, see the [examples][examples] section.
 
 [synth]: cli.md
-[synth-init]: cli.md#command-init
 [schema]: schema.md
 [generators]: ../content/object.md
 [core-concepts]: core-concepts.md
diff --git a/docs/docs/other/telemetry.md b/docs/docs/other/telemetry.md
index ad7234f3..86c4881b 100644
--- a/docs/docs/other/telemetry.md
+++ b/docs/docs/other/telemetry.md
@@ -60,7 +60,6 @@ Synth's telemetry collects 8 fields:
   at `~/.config/synth/config.json`
 - `command`: The command that was issued by the user. This is a text field whose
   value is one of the following:
-  - `init`
   - `import`
   - `generate`
   - `telemetry::enabled`
@@ -93,7 +92,6 @@ activity:
       "categorical": {
           "import": 1,
           "generate": 10,
-          "init": 1,
           "telemetry::enabled": 10,
           "telemetry::disabled": 1
       }
diff --git a/www/components/Examples.tsx b/www/components/Examples.tsx
index 7cc6697d..21182b01 100644
--- a/www/components/Examples.tsx
+++ b/www/components/Examples.tsx
@@ -6,12 +6,10 @@ import Section from "./Section";
 const timeSeriesExample = {
     "type": "object",
     "timestamp": {
-        "type": "string",
-        "date_time": {
-            "format": "%Y-%m-%dT%H:%M:%S",
-            "subtype": "naive_date_time",
-            "begin": "2020-06-07T12:00:00"
-        }
+        "type": "date_time",
+        "subtype": "naive_date_time",
+        "format": "%Y-%m-%dT%H:%M:%S",
+        "begin": "2020-06-07T12:00:00"
     },
     "px_last": {
         "type": "number",
@@ -62,11 +60,10 @@ const eventsExample = {
         }
     },
     "timestamp": {
-        "type": "string",
-        "date_time": {
-            "format": "%Y-%m-%dT%H:%M:%S",
-            "subtype": "naive_date_time",
-            "begin": "2020-06-07T12:00:00"
+        "type": "date_time",
+        "subtype": "naive_date_time",
+        "format": "%Y-%m-%dT%H:%M:%S",
+        "begin": "2020-06-07T12:00:00"
         }
     },
     "ip_v4": {


Test patch: