Repository: oxidecomputer/typify
Pull request #499 (2024-02-03 01:25:35)

Be more rigorous when looking for constant values
Related to #498

rseymour: Checking this out now. Getting pydantic and rust to meet in the middle via jsonschema is a fun challenge.

Patch:
diff --git a/Cargo.lock b/Cargo.lock
index 954ccfd..4e52c7d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -909,18 +909,18 @@ checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090"
 
 [[package]]
 name = "serde"
-version = "1.0.195"
+version = "1.0.196"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02"
+checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"
 dependencies = [
  "serde_derive",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.195"
+version = "1.0.196"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c"
+checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"
 dependencies = [
  "proc-macro2",
  "quote",
diff --git a/typify-impl/Cargo.toml b/typify-impl/Cargo.toml
index cc06199..6a15df9 100644
--- a/typify-impl/Cargo.toml
+++ b/typify-impl/Cargo.toml
@@ -27,6 +27,6 @@ paste = "1.0.14"
 rustfmt-wrapper = "0.2.1"
 schema = "0.1.0"
 schemars = { version = "0.8.16", features = ["uuid1"] }
-serde = "1.0.109"
+serde = "1.0.196"
 syn = { version = "2.0.48", features = ["full", "extra-traits"] }
 uuid = "1.7.0"
diff --git a/typify-impl/src/util.rs b/typify-impl/src/util.rs
index 707d4e4..169cd19 100644
--- a/typify-impl/src/util.rs
+++ b/typify-impl/src/util.rs
@@ -457,7 +457,7 @@ fn array_schemas_mutually_exclusive(
 /// otherwise return None.
 pub(crate) fn constant_string_value(schema: &Schema) -> Option<&str> {
     match schema {
-        // Strings must be simple enumerations.
+        // Singleton, typed enumerated value.
         Schema::Object(SchemaObject {
             metadata: _,
             instance_type: Some(SingleOrVec::Single(single)),
@@ -471,13 +471,58 @@ pub(crate) fn constant_string_value(schema: &Schema) -> Option<&str> {
             object: None,
             reference: None,
             extensions: _,
-        }) if single.as_ref() == &InstanceType::String => {
-            if values.len() == 1 {
-                values.get(0).and_then(|value| value.as_str())
-            } else {
-                None
-            }
+        }) if single.as_ref() == &InstanceType::String && values.len() == 1 => {
+            values.first().unwrap().as_str()
         }
+
+        // Singleton, untyped enumerated value.
+        Schema::Object(SchemaObject {
+            metadata: _,
+            instance_type: None,
+            format: None,
+            enum_values: Some(values),
+            const_value: None,
+            subschemas: None,
+            number: None,
+            string: None,
+            array: None,
+            object: None,
+            reference: None,
+            extensions: _,
+        }) if values.len() == 1 => values.first().unwrap().as_str(),
+
+        // Constant value.
+        Schema::Object(SchemaObject {
+            metadata: _,
+            instance_type: Some(SingleOrVec::Single(single)),
+            format: None,
+            enum_values: None,
+            const_value: Some(value),
+            subschemas: None,
+            number: None,
+            string: None,
+            array: None,
+            object: None,
+            reference: None,
+            extensions: _,
+        }) if single.as_ref() == &InstanceType::String => value.as_str(),
+
+        // Constant, untyped value.
+        Schema::Object(SchemaObject {
+            metadata: _,
+            instance_type: None,
+            format: None,
+            enum_values: None,
+            const_value: Some(value),
+            subschemas: None,
+            number: None,
+            string: None,
+            array: None,
+            object: None,
+            reference: None,
+            extensions: _,
+        }) => value.as_str(),
+
         _ => None,
     }
 }
diff --git a/typify-macro/Cargo.toml b/typify-macro/Cargo.toml
index ada7b0d..5607b5d 100644
--- a/typify-macro/Cargo.toml
+++ b/typify-macro/Cargo.toml
@@ -14,7 +14,7 @@ proc-macro = true
 proc-macro2 = "1.0.78"
 quote = "1.0.35"
 schemars = "0.8.16"
-serde = "1.0.195"
+serde = "1.0.196"
 serde_json = "1.0.113"
 serde_tokenstream = "0.2.0"
 syn = { version = "2.0", features = ["full", "extra-traits"] }
diff --git a/typify/Cargo.toml b/typify/Cargo.toml
index 5f2320b..31c8a69 100644
--- a/typify/Cargo.toml
+++ b/typify/Cargo.toml
@@ -26,7 +26,7 @@ quote = "1.0.34"
 regress = "0.7.1"
 rustfmt-wrapper = "0.2.1"
 schemars = "0.8.16"
-serde = "1.0.193"
+serde = "1.0.196"
 serde_json = "1.0.113"
 trybuild = "1.0.89"
 uuid = { version = "1.7.0", features = ["serde"] }


Test patch:
diff --git a/typify-impl/tests/vega.out b/typify-impl/tests/vega.out
index 3eb0ab2..2eb6271 100644
--- a/typify-impl/tests/vega.out
+++ b/typify-impl/tests/vega.out
@@ -21629,43 +21629,43 @@ impl From<SignalRef> for DensityTransformAsVariant0Item {
 #[doc = r" ```"]
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(untagged, deny_unknown_fields)]
+#[serde(tag = "function", deny_unknown_fields)]
 pub enum DensityTransformDistribution {
-    Variant0 {
-        function: DensityTransformDistributionVariant0Function,
+    #[serde(rename = "normal")]
+    Normal {
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        mean: Option<DensityTransformDistributionVariant0Mean>,
-        #[serde(default = "defaults::density_transform_distribution_variant0_stdev")]
-        stdev: DensityTransformDistributionVariant0Stdev,
+        mean: Option<DensityTransformDistributionMean>,
+        #[serde(default = "defaults::density_transform_distribution_normal_stdev")]
+        stdev: DensityTransformDistributionStdev,
     },
-    Variant1 {
-        function: DensityTransformDistributionVariant1Function,
+    #[serde(rename = "lognormal")]
+    Lognormal {
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        mean: Option<DensityTransformDistributionVariant1Mean>,
-        #[serde(default = "defaults::density_transform_distribution_variant1_stdev")]
-        stdev: DensityTransformDistributionVariant1Stdev,
+        mean: Option<DensityTransformDistributionMean>,
+        #[serde(default = "defaults::density_transform_distribution_lognormal_stdev")]
+        stdev: DensityTransformDistributionStdev,
     },
-    Variant2 {
-        function: DensityTransformDistributionVariant2Function,
-        #[serde(default = "defaults::density_transform_distribution_variant2_max")]
-        max: DensityTransformDistributionVariant2Max,
+    #[serde(rename = "uniform")]
+    Uniform {
+        #[serde(default = "defaults::density_transform_distribution_uniform_max")]
+        max: DensityTransformDistributionMax,
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        min: Option<DensityTransformDistributionVariant2Min>,
+        min: Option<DensityTransformDistributionMin>,
     },
-    Variant3 {
+    #[serde(rename = "kde")]
+    Kde {
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        bandwidth: Option<DensityTransformDistributionVariant3Bandwidth>,
-        field: DensityTransformDistributionVariant3Field,
+        bandwidth: Option<DensityTransformDistributionBandwidth>,
+        field: DensityTransformDistributionField,
         #[serde(default, skip_serializing_if = "Option::is_none")]
         from: Option<String>,
-        function: DensityTransformDistributionVariant3Function,
     },
-    Variant4 {
+    #[serde(rename = "mixture")]
+    Mixture {
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        distributions: Option<DensityTransformDistributionVariant4Distributions>,
-        function: DensityTransformDistributionVariant4Function,
+        distributions: Option<DensityTransformDistributionDistributions>,
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        weights: Option<DensityTransformDistributionVariant4Weights>,
+        weights: Option<DensityTransformDistributionWeights>,
     },
 }
 impl From<&DensityTransformDistribution> for DensityTransformDistribution {
@@ -21673,65 +21673,7 @@ impl From<&DensityTransformDistribution> for DensityTransformDistribution {
         value.clone()
     }
 }
-#[doc = "DensityTransformDistributionVariant0Function"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"enum\": ["]
-#[doc = "    \"normal\""]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
-pub enum DensityTransformDistributionVariant0Function {
-    #[serde(rename = "normal")]
-    Normal,
-}
-impl From<&DensityTransformDistributionVariant0Function>
-    for DensityTransformDistributionVariant0Function
-{
-    fn from(value: &DensityTransformDistributionVariant0Function) -> Self {
-        value.clone()
-    }
-}
-impl ToString for DensityTransformDistributionVariant0Function {
-    fn to_string(&self) -> String {
-        match *self {
-            Self::Normal => "normal".to_string(),
-        }
-    }
-}
-impl std::str::FromStr for DensityTransformDistributionVariant0Function {
-    type Err = self::error::ConversionError;
-    fn from_str(value: &str) -> Result<Self, self::error::ConversionError> {
-        match value {
-            "normal" => Ok(Self::Normal),
-            _ => Err("invalid value".into()),
-        }
-    }
-}
-impl std::convert::TryFrom<&str> for DensityTransformDistributionVariant0Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &str) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<&String> for DensityTransformDistributionVariant0Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<String> for DensityTransformDistributionVariant0Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-#[doc = "DensityTransformDistributionVariant0Mean"]
+#[doc = "DensityTransformDistributionBandwidth"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
@@ -21750,35 +21692,35 @@ impl std::convert::TryFrom<String> for DensityTransformDistributionVariant0Funct
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum DensityTransformDistributionVariant0Mean {
+pub enum DensityTransformDistributionBandwidth {
     Variant0(f64),
     Variant1(SignalRef),
 }
-impl From<&DensityTransformDistributionVariant0Mean> for DensityTransformDistributionVariant0Mean {
-    fn from(value: &DensityTransformDistributionVariant0Mean) -> Self {
+impl From<&DensityTransformDistributionBandwidth> for DensityTransformDistributionBandwidth {
+    fn from(value: &DensityTransformDistributionBandwidth) -> Self {
         value.clone()
     }
 }
-impl From<f64> for DensityTransformDistributionVariant0Mean {
+impl From<f64> for DensityTransformDistributionBandwidth {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for DensityTransformDistributionVariant0Mean {
+impl From<SignalRef> for DensityTransformDistributionBandwidth {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "DensityTransformDistributionVariant0Stdev"]
+#[doc = "DensityTransformDistributionDistributions"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
 #[doc = r" ```json"]
 #[doc = "{"]
-#[doc = "  \"default\": 1,"]
-#[doc = "  \"anyOf\": ["]
+#[doc = "  \"oneOf\": ["]
 #[doc = "    {"]
-#[doc = "      \"type\": \"number\""]
+#[doc = "      \"type\": \"array\","]
+#[doc = "      \"items\": {}"]
 #[doc = "    },"]
 #[doc = "    {"]
 #[doc = "      \"$ref\": \"#/definitions/signalRef\""]
@@ -21789,102 +21731,42 @@ impl From<SignalRef> for DensityTransformDistributionVariant0Mean {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum DensityTransformDistributionVariant0Stdev {
-    Variant0(f64),
+pub enum DensityTransformDistributionDistributions {
+    Variant0(Vec<serde_json::Value>),
     Variant1(SignalRef),
 }
-impl From<&DensityTransformDistributionVariant0Stdev>
-    for DensityTransformDistributionVariant0Stdev
+impl From<&DensityTransformDistributionDistributions>
+    for DensityTransformDistributionDistributions
 {
-    fn from(value: &DensityTransformDistributionVariant0Stdev) -> Self {
+    fn from(value: &DensityTransformDistributionDistributions) -> Self {
         value.clone()
     }
 }
-impl Default for DensityTransformDistributionVariant0Stdev {
-    fn default() -> Self {
-        DensityTransformDistributionVariant0Stdev::Variant0(1_f64)
-    }
-}
-impl From<f64> for DensityTransformDistributionVariant0Stdev {
-    fn from(value: f64) -> Self {
+impl From<Vec<serde_json::Value>> for DensityTransformDistributionDistributions {
+    fn from(value: Vec<serde_json::Value>) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for DensityTransformDistributionVariant0Stdev {
+impl From<SignalRef> for DensityTransformDistributionDistributions {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "DensityTransformDistributionVariant1Function"]
+#[doc = "DensityTransformDistributionField"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
 #[doc = r" ```json"]
 #[doc = "{"]
-#[doc = "  \"enum\": ["]
-#[doc = "    \"lognormal\""]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
-pub enum DensityTransformDistributionVariant1Function {
-    #[serde(rename = "lognormal")]
-    Lognormal,
-}
-impl From<&DensityTransformDistributionVariant1Function>
-    for DensityTransformDistributionVariant1Function
-{
-    fn from(value: &DensityTransformDistributionVariant1Function) -> Self {
-        value.clone()
-    }
-}
-impl ToString for DensityTransformDistributionVariant1Function {
-    fn to_string(&self) -> String {
-        match *self {
-            Self::Lognormal => "lognormal".to_string(),
-        }
-    }
-}
-impl std::str::FromStr for DensityTransformDistributionVariant1Function {
-    type Err = self::error::ConversionError;
-    fn from_str(value: &str) -> Result<Self, self::error::ConversionError> {
-        match value {
-            "lognormal" => Ok(Self::Lognormal),
-            _ => Err("invalid value".into()),
-        }
-    }
-}
-impl std::convert::TryFrom<&str> for DensityTransformDistributionVariant1Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &str) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<&String> for DensityTransformDistributionVariant1Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<String> for DensityTransformDistributionVariant1Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-#[doc = "DensityTransformDistributionVariant1Mean"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"anyOf\": ["]
+#[doc = "  \"oneOf\": ["]
 #[doc = "    {"]
-#[doc = "      \"type\": \"number\""]
+#[doc = "      \"$ref\": \"#/definitions/scaleField\""]
 #[doc = "    },"]
 #[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/signalRef\""]
+#[doc = "      \"$ref\": \"#/definitions/paramField\""]
+#[doc = "    },"]
+#[doc = "    {"]
+#[doc = "      \"$ref\": \"#/definitions/expr\""]
 #[doc = "    }"]
 #[doc = "  ]"]
 #[doc = "}"]
@@ -21892,26 +21774,32 @@ impl std::convert::TryFrom<String> for DensityTransformDistributionVariant1Funct
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum DensityTransformDistributionVariant1Mean {
-    Variant0(f64),
-    Variant1(SignalRef),
+pub enum DensityTransformDistributionField {
+    ScaleField(ScaleField),
+    ParamField(ParamField),
+    Expr(Expr),
 }
-impl From<&DensityTransformDistributionVariant1Mean> for DensityTransformDistributionVariant1Mean {
-    fn from(value: &DensityTransformDistributionVariant1Mean) -> Self {
+impl From<&DensityTransformDistributionField> for DensityTransformDistributionField {
+    fn from(value: &DensityTransformDistributionField) -> Self {
         value.clone()
     }
 }
-impl From<f64> for DensityTransformDistributionVariant1Mean {
-    fn from(value: f64) -> Self {
-        Self::Variant0(value)
+impl From<ScaleField> for DensityTransformDistributionField {
+    fn from(value: ScaleField) -> Self {
+        Self::ScaleField(value)
     }
 }
-impl From<SignalRef> for DensityTransformDistributionVariant1Mean {
-    fn from(value: SignalRef) -> Self {
-        Self::Variant1(value)
+impl From<ParamField> for DensityTransformDistributionField {
+    fn from(value: ParamField) -> Self {
+        Self::ParamField(value)
     }
 }
-#[doc = "DensityTransformDistributionVariant1Stdev"]
+impl From<Expr> for DensityTransformDistributionField {
+    fn from(value: Expr) -> Self {
+        Self::Expr(value)
+    }
+}
+#[doc = "DensityTransformDistributionMax"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
@@ -21931,97 +21819,36 @@ impl From<SignalRef> for DensityTransformDistributionVariant1Mean {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum DensityTransformDistributionVariant1Stdev {
+pub enum DensityTransformDistributionMax {
     Variant0(f64),
     Variant1(SignalRef),
 }
-impl From<&DensityTransformDistributionVariant1Stdev>
-    for DensityTransformDistributionVariant1Stdev
-{
-    fn from(value: &DensityTransformDistributionVariant1Stdev) -> Self {
+impl From<&DensityTransformDistributionMax> for DensityTransformDistributionMax {
+    fn from(value: &DensityTransformDistributionMax) -> Self {
         value.clone()
     }
 }
-impl Default for DensityTransformDistributionVariant1Stdev {
+impl Default for DensityTransformDistributionMax {
     fn default() -> Self {
-        DensityTransformDistributionVariant1Stdev::Variant0(1_f64)
+        DensityTransformDistributionMax::Variant0(1_f64)
     }
 }
-impl From<f64> for DensityTransformDistributionVariant1Stdev {
+impl From<f64> for DensityTransformDistributionMax {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for DensityTransformDistributionVariant1Stdev {
+impl From<SignalRef> for DensityTransformDistributionMax {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "DensityTransformDistributionVariant2Function"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"enum\": ["]
-#[doc = "    \"uniform\""]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
-pub enum DensityTransformDistributionVariant2Function {
-    #[serde(rename = "uniform")]
-    Uniform,
-}
-impl From<&DensityTransformDistributionVariant2Function>
-    for DensityTransformDistributionVariant2Function
-{
-    fn from(value: &DensityTransformDistributionVariant2Function) -> Self {
-        value.clone()
-    }
-}
-impl ToString for DensityTransformDistributionVariant2Function {
-    fn to_string(&self) -> String {
-        match *self {
-            Self::Uniform => "uniform".to_string(),
-        }
-    }
-}
-impl std::str::FromStr for DensityTransformDistributionVariant2Function {
-    type Err = self::error::ConversionError;
-    fn from_str(value: &str) -> Result<Self, self::error::ConversionError> {
-        match value {
-            "uniform" => Ok(Self::Uniform),
-            _ => Err("invalid value".into()),
-        }
-    }
-}
-impl std::convert::TryFrom<&str> for DensityTransformDistributionVariant2Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &str) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<&String> for DensityTransformDistributionVariant2Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<String> for DensityTransformDistributionVariant2Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-#[doc = "DensityTransformDistributionVariant2Max"]
+#[doc = "DensityTransformDistributionMean"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
 #[doc = r" ```json"]
 #[doc = "{"]
-#[doc = "  \"default\": 1,"]
 #[doc = "  \"anyOf\": ["]
 #[doc = "    {"]
 #[doc = "      \"type\": \"number\""]
@@ -22035,31 +21862,26 @@ impl std::convert::TryFrom<String> for DensityTransformDistributionVariant2Funct
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum DensityTransformDistributionVariant2Max {
+pub enum DensityTransformDistributionMean {
     Variant0(f64),
     Variant1(SignalRef),
 }
-impl From<&DensityTransformDistributionVariant2Max> for DensityTransformDistributionVariant2Max {
-    fn from(value: &DensityTransformDistributionVariant2Max) -> Self {
+impl From<&DensityTransformDistributionMean> for DensityTransformDistributionMean {
+    fn from(value: &DensityTransformDistributionMean) -> Self {
         value.clone()
     }
 }
-impl Default for DensityTransformDistributionVariant2Max {
-    fn default() -> Self {
-        DensityTransformDistributionVariant2Max::Variant0(1_f64)
-    }
-}
-impl From<f64> for DensityTransformDistributionVariant2Max {
+impl From<f64> for DensityTransformDistributionMean {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for DensityTransformDistributionVariant2Max {
+impl From<SignalRef> for DensityTransformDistributionMean {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "DensityTransformDistributionVariant2Min"]
+#[doc = "DensityTransformDistributionMin"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
@@ -22078,31 +21900,32 @@ impl From<SignalRef> for DensityTransformDistributionVariant2Max {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum DensityTransformDistributionVariant2Min {
+pub enum DensityTransformDistributionMin {
     Variant0(f64),
     Variant1(SignalRef),
 }
-impl From<&DensityTransformDistributionVariant2Min> for DensityTransformDistributionVariant2Min {
-    fn from(value: &DensityTransformDistributionVariant2Min) -> Self {
+impl From<&DensityTransformDistributionMin> for DensityTransformDistributionMin {
+    fn from(value: &DensityTransformDistributionMin) -> Self {
         value.clone()
     }
 }
-impl From<f64> for DensityTransformDistributionVariant2Min {
+impl From<f64> for DensityTransformDistributionMin {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for DensityTransformDistributionVariant2Min {
+impl From<SignalRef> for DensityTransformDistributionMin {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "DensityTransformDistributionVariant3Bandwidth"]
+#[doc = "DensityTransformDistributionStdev"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
 #[doc = r" ```json"]
 #[doc = "{"]
+#[doc = "  \"default\": 1,"]
 #[doc = "  \"anyOf\": ["]
 #[doc = "    {"]
 #[doc = "      \"type\": \"number\""]
@@ -22116,234 +21939,31 @@ impl From<SignalRef> for DensityTransformDistributionVariant2Min {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum DensityTransformDistributionVariant3Bandwidth {
+pub enum DensityTransformDistributionStdev {
     Variant0(f64),
     Variant1(SignalRef),
 }
-impl From<&DensityTransformDistributionVariant3Bandwidth>
-    for DensityTransformDistributionVariant3Bandwidth
-{
-    fn from(value: &DensityTransformDistributionVariant3Bandwidth) -> Self {
-        value.clone()
-    }
-}
-impl From<f64> for DensityTransformDistributionVariant3Bandwidth {
-    fn from(value: f64) -> Self {
-        Self::Variant0(value)
-    }
-}
-impl From<SignalRef> for DensityTransformDistributionVariant3Bandwidth {
-    fn from(value: SignalRef) -> Self {
-        Self::Variant1(value)
-    }
-}
-#[doc = "DensityTransformDistributionVariant3Field"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"oneOf\": ["]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/scaleField\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/paramField\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/expr\""]
-#[doc = "    }"]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(untagged)]
-pub enum DensityTransformDistributionVariant3Field {
-    ScaleField(ScaleField),
-    ParamField(ParamField),
-    Expr(Expr),
-}
-impl From<&DensityTransformDistributionVariant3Field>
-    for DensityTransformDistributionVariant3Field
-{
-    fn from(value: &DensityTransformDistributionVariant3Field) -> Self {
+impl From<&DensityTransformDistributionStdev> for DensityTransformDistributionStdev {
+    fn from(value: &DensityTransformDistributionStdev) -> Self {
         value.clone()
     }
 }
-impl From<ScaleField> for DensityTransformDistributionVariant3Field {
-    fn from(value: ScaleField) -> Self {
-        Self::ScaleField(value)
-    }
-}
-impl From<ParamField> for DensityTransformDistributionVariant3Field {
-    fn from(value: ParamField) -> Self {
-        Self::ParamField(value)
-    }
-}
-impl From<Expr> for DensityTransformDistributionVariant3Field {
-    fn from(value: Expr) -> Self {
-        Self::Expr(value)
-    }
-}
-#[doc = "DensityTransformDistributionVariant3Function"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"enum\": ["]
-#[doc = "    \"kde\""]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
-pub enum DensityTransformDistributionVariant3Function {
-    #[serde(rename = "kde")]
-    Kde,
-}
-impl From<&DensityTransformDistributionVariant3Function>
-    for DensityTransformDistributionVariant3Function
-{
-    fn from(value: &DensityTransformDistributionVariant3Function) -> Self {
-        value.clone()
-    }
-}
-impl ToString for DensityTransformDistributionVariant3Function {
-    fn to_string(&self) -> String {
-        match *self {
-            Self::Kde => "kde".to_string(),
-        }
-    }
-}
-impl std::str::FromStr for DensityTransformDistributionVariant3Function {
-    type Err = self::error::ConversionError;
-    fn from_str(value: &str) -> Result<Self, self::error::ConversionError> {
-        match value {
-            "kde" => Ok(Self::Kde),
-            _ => Err("invalid value".into()),
-        }
-    }
-}
-impl std::convert::TryFrom<&str> for DensityTransformDistributionVariant3Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &str) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<&String> for DensityTransformDistributionVariant3Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<String> for DensityTransformDistributionVariant3Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-#[doc = "DensityTransformDistributionVariant4Distributions"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"oneOf\": ["]
-#[doc = "    {"]
-#[doc = "      \"type\": \"array\","]
-#[doc = "      \"items\": {}"]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/signalRef\""]
-#[doc = "    }"]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(untagged)]
-pub enum DensityTransformDistributionVariant4Distributions {
-    Variant0(Vec<serde_json::Value>),
-    Variant1(SignalRef),
-}
-impl From<&DensityTransformDistributionVariant4Distributions>
-    for DensityTransformDistributionVariant4Distributions
-{
-    fn from(value: &DensityTransformDistributionVariant4Distributions) -> Self {
-        value.clone()
+impl Default for DensityTransformDistributionStdev {
+    fn default() -> Self {
+        DensityTransformDistributionStdev::Variant0(1_f64)
     }
 }
-impl From<Vec<serde_json::Value>> for DensityTransformDistributionVariant4Distributions {
-    fn from(value: Vec<serde_json::Value>) -> Self {
+impl From<f64> for DensityTransformDistributionStdev {
+    fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for DensityTransformDistributionVariant4Distributions {
+impl From<SignalRef> for DensityTransformDistributionStdev {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "DensityTransformDistributionVariant4Function"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"enum\": ["]
-#[doc = "    \"mixture\""]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
-pub enum DensityTransformDistributionVariant4Function {
-    #[serde(rename = "mixture")]
-    Mixture,
-}
-impl From<&DensityTransformDistributionVariant4Function>
-    for DensityTransformDistributionVariant4Function
-{
-    fn from(value: &DensityTransformDistributionVariant4Function) -> Self {
-        value.clone()
-    }
-}
-impl ToString for DensityTransformDistributionVariant4Function {
-    fn to_string(&self) -> String {
-        match *self {
-            Self::Mixture => "mixture".to_string(),
-        }
-    }
-}
-impl std::str::FromStr for DensityTransformDistributionVariant4Function {
-    type Err = self::error::ConversionError;
-    fn from_str(value: &str) -> Result<Self, self::error::ConversionError> {
-        match value {
-            "mixture" => Ok(Self::Mixture),
-            _ => Err("invalid value".into()),
-        }
-    }
-}
-impl std::convert::TryFrom<&str> for DensityTransformDistributionVariant4Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &str) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<&String> for DensityTransformDistributionVariant4Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<String> for DensityTransformDistributionVariant4Function {
-    type Error = self::error::ConversionError;
-    fn try_from(value: String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-#[doc = "DensityTransformDistributionVariant4Weights"]
+#[doc = "DensityTransformDistributionWeights"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
@@ -22372,30 +21992,28 @@ impl std::convert::TryFrom<String> for DensityTransformDistributionVariant4Funct
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum DensityTransformDistributionVariant4Weights {
-    Variant0(Vec<DensityTransformDistributionVariant4WeightsVariant0Item>),
+pub enum DensityTransformDistributionWeights {
+    Variant0(Vec<DensityTransformDistributionWeightsVariant0Item>),
     Variant1(SignalRef),
 }
-impl From<&DensityTransformDistributionVariant4Weights>
-    for DensityTransformDistributionVariant4Weights
-{
-    fn from(value: &DensityTransformDistributionVariant4Weights) -> Self {
+impl From<&DensityTransformDistributionWeights> for DensityTransformDistributionWeights {
+    fn from(value: &DensityTransformDistributionWeights) -> Self {
         value.clone()
     }
 }
-impl From<Vec<DensityTransformDistributionVariant4WeightsVariant0Item>>
-    for DensityTransformDistributionVariant4Weights
+impl From<Vec<DensityTransformDistributionWeightsVariant0Item>>
+    for DensityTransformDistributionWeights
 {
-    fn from(value: Vec<DensityTransformDistributionVariant4WeightsVariant0Item>) -> Self {
+    fn from(value: Vec<DensityTransformDistributionWeightsVariant0Item>) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for DensityTransformDistributionVariant4Weights {
+impl From<SignalRef> for DensityTransformDistributionWeights {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "DensityTransformDistributionVariant4WeightsVariant0Item"]
+#[doc = "DensityTransformDistributionWeightsVariant0Item"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
@@ -22414,23 +22032,23 @@ impl From<SignalRef> for DensityTransformDistributionVariant4Weights {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum DensityTransformDistributionVariant4WeightsVariant0Item {
+pub enum DensityTransformDistributionWeightsVariant0Item {
     Variant0(f64),
     Variant1(SignalRef),
 }
-impl From<&DensityTransformDistributionVariant4WeightsVariant0Item>
-    for DensityTransformDistributionVariant4WeightsVariant0Item
+impl From<&DensityTransformDistributionWeightsVariant0Item>
+    for DensityTransformDistributionWeightsVariant0Item
 {
-    fn from(value: &DensityTransformDistributionVariant4WeightsVariant0Item) -> Self {
+    fn from(value: &DensityTransformDistributionWeightsVariant0Item) -> Self {
         value.clone()
     }
 }
-impl From<f64> for DensityTransformDistributionVariant4WeightsVariant0Item {
+impl From<f64> for DensityTransformDistributionWeightsVariant0Item {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for DensityTransformDistributionVariant4WeightsVariant0Item {
+impl From<SignalRef> for DensityTransformDistributionWeightsVariant0Item {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
@@ -27656,68 +27274,68 @@ impl From<SignalRef> for ForceTransformAsVariant0Item {
 #[doc = r" ```"]
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(untagged, deny_unknown_fields)]
+#[serde(tag = "force", deny_unknown_fields)]
 pub enum ForceTransformForcesItem {
-    Variant0 {
-        force: ForceTransformForcesItemVariant0Force,
+    #[serde(rename = "center")]
+    Center {
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        x: Option<ForceTransformForcesItemVariant0X>,
+        x: Option<ForceTransformForcesItemX>,
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        y: Option<ForceTransformForcesItemVariant0Y>,
+        y: Option<ForceTransformForcesItemY>,
     },
-    Variant1 {
-        force: ForceTransformForcesItemVariant1Force,
-        #[serde(default = "defaults::force_transform_forces_item_variant1_iterations")]
-        iterations: ForceTransformForcesItemVariant1Iterations,
+    #[serde(rename = "collide")]
+    Collide {
+        #[serde(default = "defaults::force_transform_forces_item_collide_iterations")]
+        iterations: ForceTransformForcesItemIterations,
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        radius: Option<ForceTransformForcesItemVariant1Radius>,
-        #[serde(default = "defaults::force_transform_forces_item_variant1_strength")]
-        strength: ForceTransformForcesItemVariant1Strength,
+        radius: Option<ForceTransformForcesItemRadius>,
+        #[serde(default = "defaults::force_transform_forces_item_collide_strength")]
+        strength: ForceTransformForcesItemStrength,
     },
-    Variant2 {
+    #[serde(rename = "nbody")]
+    Nbody {
         #[serde(
             rename = "distanceMax",
             default,
             skip_serializing_if = "Option::is_none"
         )]
-        distance_max: Option<ForceTransformForcesItemVariant2DistanceMax>,
+        distance_max: Option<ForceTransformForcesItemDistanceMax>,
         #[serde(
             rename = "distanceMin",
-            default = "defaults::force_transform_forces_item_variant2_distance_min"
+            default = "defaults::force_transform_forces_item_nbody_distance_min"
         )]
-        distance_min: ForceTransformForcesItemVariant2DistanceMin,
-        force: ForceTransformForcesItemVariant2Force,
-        #[serde(default = "defaults::force_transform_forces_item_variant2_strength")]
-        strength: ForceTransformForcesItemVariant2Strength,
-        #[serde(default = "defaults::force_transform_forces_item_variant2_theta")]
-        theta: ForceTransformForcesItemVariant2Theta,
+        distance_min: ForceTransformForcesItemDistanceMin,
+        #[serde(default = "defaults::force_transform_forces_item_nbody_strength")]
+        strength: ForceTransformForcesItemStrength,
+        #[serde(default = "defaults::force_transform_forces_item_nbody_theta")]
+        theta: ForceTransformForcesItemTheta,
     },
-    Variant3 {
-        #[serde(default = "defaults::force_transform_forces_item_variant3_distance")]
-        distance: ForceTransformForcesItemVariant3Distance,
-        force: ForceTransformForcesItemVariant3Force,
+    #[serde(rename = "link")]
+    Link {
+        #[serde(default = "defaults::force_transform_forces_item_link_distance")]
+        distance: ForceTransformForcesItemDistance,
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        id: Option<ForceTransformForcesItemVariant3Id>,
-        #[serde(default = "defaults::force_transform_forces_item_variant3_iterations")]
-        iterations: ForceTransformForcesItemVariant3Iterations,
+        id: Option<ForceTransformForcesItemId>,
+        #[serde(default = "defaults::force_transform_forces_item_link_iterations")]
+        iterations: ForceTransformForcesItemIterations,
         #[serde(default, skip_serializing_if = "Option::is_none")]
         links: Option<String>,
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        strength: Option<ForceTransformForcesItemVariant3Strength>,
+        strength: Option<ForceTransformForcesItemStrength>,
     },
-    Variant4 {
-        force: ForceTransformForcesItemVariant4Force,
-        #[serde(default = "defaults::force_transform_forces_item_variant4_strength")]
-        strength: ForceTransformForcesItemVariant4Strength,
+    #[serde(rename = "x")]
+    X {
+        #[serde(default = "defaults::force_transform_forces_item_x_strength")]
+        strength: ForceTransformForcesItemStrength,
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        x: Option<ForceTransformForcesItemVariant4X>,
+        x: Option<ForceTransformForcesItemX>,
     },
-    Variant5 {
-        force: ForceTransformForcesItemVariant5Force,
-        #[serde(default = "defaults::force_transform_forces_item_variant5_strength")]
-        strength: ForceTransformForcesItemVariant5Strength,
+    #[serde(rename = "y")]
+    Y {
+        #[serde(default = "defaults::force_transform_forces_item_y_strength")]
+        strength: ForceTransformForcesItemStrength,
         #[serde(default, skip_serializing_if = "Option::is_none")]
-        y: Option<ForceTransformForcesItemVariant5Y>,
+        y: Option<ForceTransformForcesItemY>,
     },
 }
 impl From<&ForceTransformForcesItem> for ForceTransformForcesItem {
@@ -27725,246 +27343,13 @@ impl From<&ForceTransformForcesItem> for ForceTransformForcesItem {
         value.clone()
     }
 }
-#[doc = "ForceTransformForcesItemVariant0Force"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"enum\": ["]
-#[doc = "    \"center\""]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
-pub enum ForceTransformForcesItemVariant0Force {
-    #[serde(rename = "center")]
-    Center,
-}
-impl From<&ForceTransformForcesItemVariant0Force> for ForceTransformForcesItemVariant0Force {
-    fn from(value: &ForceTransformForcesItemVariant0Force) -> Self {
-        value.clone()
-    }
-}
-impl ToString for ForceTransformForcesItemVariant0Force {
-    fn to_string(&self) -> String {
-        match *self {
-            Self::Center => "center".to_string(),
-        }
-    }
-}
-impl std::str::FromStr for ForceTransformForcesItemVariant0Force {
-    type Err = self::error::ConversionError;
-    fn from_str(value: &str) -> Result<Self, self::error::ConversionError> {
-        match value {
-            "center" => Ok(Self::Center),
-            _ => Err("invalid value".into()),
-        }
-    }
-}
-impl std::convert::TryFrom<&str> for ForceTransformForcesItemVariant0Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &str) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<&String> for ForceTransformForcesItemVariant0Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<String> for ForceTransformForcesItemVariant0Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-#[doc = "ForceTransformForcesItemVariant0X"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"anyOf\": ["]
-#[doc = "    {"]
-#[doc = "      \"type\": \"number\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/signalRef\""]
-#[doc = "    }"]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(untagged)]
-pub enum ForceTransformForcesItemVariant0X {
-    Variant0(f64),
-    Variant1(SignalRef),
-}
-impl From<&ForceTransformForcesItemVariant0X> for ForceTransformForcesItemVariant0X {
-    fn from(value: &ForceTransformForcesItemVariant0X) -> Self {
-        value.clone()
-    }
-}
-impl From<f64> for ForceTransformForcesItemVariant0X {
-    fn from(value: f64) -> Self {
-        Self::Variant0(value)
-    }
-}
-impl From<SignalRef> for ForceTransformForcesItemVariant0X {
-    fn from(value: SignalRef) -> Self {
-        Self::Variant1(value)
-    }
-}
-#[doc = "ForceTransformForcesItemVariant0Y"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"anyOf\": ["]
-#[doc = "    {"]
-#[doc = "      \"type\": \"number\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/signalRef\""]
-#[doc = "    }"]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(untagged)]
-pub enum ForceTransformForcesItemVariant0Y {
-    Variant0(f64),
-    Variant1(SignalRef),
-}
-impl From<&ForceTransformForcesItemVariant0Y> for ForceTransformForcesItemVariant0Y {
-    fn from(value: &ForceTransformForcesItemVariant0Y) -> Self {
-        value.clone()
-    }
-}
-impl From<f64> for ForceTransformForcesItemVariant0Y {
-    fn from(value: f64) -> Self {
-        Self::Variant0(value)
-    }
-}
-impl From<SignalRef> for ForceTransformForcesItemVariant0Y {
-    fn from(value: SignalRef) -> Self {
-        Self::Variant1(value)
-    }
-}
-#[doc = "ForceTransformForcesItemVariant1Force"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"enum\": ["]
-#[doc = "    \"collide\""]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
-pub enum ForceTransformForcesItemVariant1Force {
-    #[serde(rename = "collide")]
-    Collide,
-}
-impl From<&ForceTransformForcesItemVariant1Force> for ForceTransformForcesItemVariant1Force {
-    fn from(value: &ForceTransformForcesItemVariant1Force) -> Self {
-        value.clone()
-    }
-}
-impl ToString for ForceTransformForcesItemVariant1Force {
-    fn to_string(&self) -> String {
-        match *self {
-            Self::Collide => "collide".to_string(),
-        }
-    }
-}
-impl std::str::FromStr for ForceTransformForcesItemVariant1Force {
-    type Err = self::error::ConversionError;
-    fn from_str(value: &str) -> Result<Self, self::error::ConversionError> {
-        match value {
-            "collide" => Ok(Self::Collide),
-            _ => Err("invalid value".into()),
-        }
-    }
-}
-impl std::convert::TryFrom<&str> for ForceTransformForcesItemVariant1Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &str) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<&String> for ForceTransformForcesItemVariant1Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<String> for ForceTransformForcesItemVariant1Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-#[doc = "ForceTransformForcesItemVariant1Iterations"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"default\": 1,"]
-#[doc = "  \"anyOf\": ["]
-#[doc = "    {"]
-#[doc = "      \"type\": \"number\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/signalRef\""]
-#[doc = "    }"]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(untagged)]
-pub enum ForceTransformForcesItemVariant1Iterations {
-    Variant0(f64),
-    Variant1(SignalRef),
-}
-impl From<&ForceTransformForcesItemVariant1Iterations>
-    for ForceTransformForcesItemVariant1Iterations
-{
-    fn from(value: &ForceTransformForcesItemVariant1Iterations) -> Self {
-        value.clone()
-    }
-}
-impl Default for ForceTransformForcesItemVariant1Iterations {
-    fn default() -> Self {
-        ForceTransformForcesItemVariant1Iterations::Variant0(1_f64)
-    }
-}
-impl From<f64> for ForceTransformForcesItemVariant1Iterations {
-    fn from(value: f64) -> Self {
-        Self::Variant0(value)
-    }
-}
-impl From<SignalRef> for ForceTransformForcesItemVariant1Iterations {
-    fn from(value: SignalRef) -> Self {
-        Self::Variant1(value)
-    }
-}
-#[doc = "ForceTransformForcesItemVariant1Radius"]
+#[doc = "ForceTransformForcesItemDistance"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
 #[doc = r" ```json"]
 #[doc = "{"]
+#[doc = "  \"default\": 30,"]
 #[doc = "  \"anyOf\": ["]
 #[doc = "    {"]
 #[doc = "      \"type\": \"number\""]
@@ -27984,82 +27369,43 @@ impl From<SignalRef> for ForceTransformForcesItemVariant1Iterations {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum ForceTransformForcesItemVariant1Radius {
+pub enum ForceTransformForcesItemDistance {
     Variant0(f64),
     Variant1(SignalRef),
     Variant2(Expr),
     Variant3(ParamField),
 }
-impl From<&ForceTransformForcesItemVariant1Radius> for ForceTransformForcesItemVariant1Radius {
-    fn from(value: &ForceTransformForcesItemVariant1Radius) -> Self {
+impl From<&ForceTransformForcesItemDistance> for ForceTransformForcesItemDistance {
+    fn from(value: &ForceTransformForcesItemDistance) -> Self {
         value.clone()
     }
 }
-impl From<f64> for ForceTransformForcesItemVariant1Radius {
+impl Default for ForceTransformForcesItemDistance {
+    fn default() -> Self {
+        ForceTransformForcesItemDistance::Variant0(30_f64)
+    }
+}
+impl From<f64> for ForceTransformForcesItemDistance {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for ForceTransformForcesItemVariant1Radius {
+impl From<SignalRef> for ForceTransformForcesItemDistance {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-impl From<Expr> for ForceTransformForcesItemVariant1Radius {
+impl From<Expr> for ForceTransformForcesItemDistance {
     fn from(value: Expr) -> Self {
         Self::Variant2(value)
     }
 }
-impl From<ParamField> for ForceTransformForcesItemVariant1Radius {
+impl From<ParamField> for ForceTransformForcesItemDistance {
     fn from(value: ParamField) -> Self {
         Self::Variant3(value)
     }
 }
-#[doc = "ForceTransformForcesItemVariant1Strength"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"default\": 0.7,"]
-#[doc = "  \"anyOf\": ["]
-#[doc = "    {"]
-#[doc = "      \"type\": \"number\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/signalRef\""]
-#[doc = "    }"]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(untagged)]
-pub enum ForceTransformForcesItemVariant1Strength {
-    Variant0(f64),
-    Variant1(SignalRef),
-}
-impl From<&ForceTransformForcesItemVariant1Strength> for ForceTransformForcesItemVariant1Strength {
-    fn from(value: &ForceTransformForcesItemVariant1Strength) -> Self {
-        value.clone()
-    }
-}
-impl Default for ForceTransformForcesItemVariant1Strength {
-    fn default() -> Self {
-        ForceTransformForcesItemVariant1Strength::Variant0(0.7_f64)
-    }
-}
-impl From<f64> for ForceTransformForcesItemVariant1Strength {
-    fn from(value: f64) -> Self {
-        Self::Variant0(value)
-    }
-}
-impl From<SignalRef> for ForceTransformForcesItemVariant1Strength {
-    fn from(value: SignalRef) -> Self {
-        Self::Variant1(value)
-    }
-}
-#[doc = "ForceTransformForcesItemVariant2DistanceMax"]
+#[doc = "ForceTransformForcesItemDistanceMax"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
@@ -28078,28 +27424,26 @@ impl From<SignalRef> for ForceTransformForcesItemVariant1Strength {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum ForceTransformForcesItemVariant2DistanceMax {
+pub enum ForceTransformForcesItemDistanceMax {
     Variant0(f64),
     Variant1(SignalRef),
 }
-impl From<&ForceTransformForcesItemVariant2DistanceMax>
-    for ForceTransformForcesItemVariant2DistanceMax
-{
-    fn from(value: &ForceTransformForcesItemVariant2DistanceMax) -> Self {
+impl From<&ForceTransformForcesItemDistanceMax> for ForceTransformForcesItemDistanceMax {
+    fn from(value: &ForceTransformForcesItemDistanceMax) -> Self {
         value.clone()
     }
 }
-impl From<f64> for ForceTransformForcesItemVariant2DistanceMax {
+impl From<f64> for ForceTransformForcesItemDistanceMax {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for ForceTransformForcesItemVariant2DistanceMax {
+impl From<SignalRef> for ForceTransformForcesItemDistanceMax {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "ForceTransformForcesItemVariant2DistanceMin"]
+#[doc = "ForceTransformForcesItemDistanceMin"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
@@ -28119,101 +27463,45 @@ impl From<SignalRef> for ForceTransformForcesItemVariant2DistanceMax {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum ForceTransformForcesItemVariant2DistanceMin {
+pub enum ForceTransformForcesItemDistanceMin {
     Variant0(f64),
     Variant1(SignalRef),
 }
-impl From<&ForceTransformForcesItemVariant2DistanceMin>
-    for ForceTransformForcesItemVariant2DistanceMin
-{
-    fn from(value: &ForceTransformForcesItemVariant2DistanceMin) -> Self {
+impl From<&ForceTransformForcesItemDistanceMin> for ForceTransformForcesItemDistanceMin {
+    fn from(value: &ForceTransformForcesItemDistanceMin) -> Self {
         value.clone()
     }
 }
-impl Default for ForceTransformForcesItemVariant2DistanceMin {
+impl Default for ForceTransformForcesItemDistanceMin {
     fn default() -> Self {
-        ForceTransformForcesItemVariant2DistanceMin::Variant0(1_f64)
+        ForceTransformForcesItemDistanceMin::Variant0(1_f64)
     }
 }
-impl From<f64> for ForceTransformForcesItemVariant2DistanceMin {
+impl From<f64> for ForceTransformForcesItemDistanceMin {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for ForceTransformForcesItemVariant2DistanceMin {
+impl From<SignalRef> for ForceTransformForcesItemDistanceMin {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "ForceTransformForcesItemVariant2Force"]
+#[doc = "ForceTransformForcesItemId"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
 #[doc = r" ```json"]
 #[doc = "{"]
-#[doc = "  \"enum\": ["]
-#[doc = "    \"nbody\""]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
-pub enum ForceTransformForcesItemVariant2Force {
-    #[serde(rename = "nbody")]
-    Nbody,
-}
-impl From<&ForceTransformForcesItemVariant2Force> for ForceTransformForcesItemVariant2Force {
-    fn from(value: &ForceTransformForcesItemVariant2Force) -> Self {
-        value.clone()
-    }
-}
-impl ToString for ForceTransformForcesItemVariant2Force {
-    fn to_string(&self) -> String {
-        match *self {
-            Self::Nbody => "nbody".to_string(),
-        }
-    }
-}
-impl std::str::FromStr for ForceTransformForcesItemVariant2Force {
-    type Err = self::error::ConversionError;
-    fn from_str(value: &str) -> Result<Self, self::error::ConversionError> {
-        match value {
-            "nbody" => Ok(Self::Nbody),
-            _ => Err("invalid value".into()),
-        }
-    }
-}
-impl std::convert::TryFrom<&str> for ForceTransformForcesItemVariant2Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &str) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<&String> for ForceTransformForcesItemVariant2Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<String> for ForceTransformForcesItemVariant2Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-#[doc = "ForceTransformForcesItemVariant2Strength"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"default\": -30,"]
-#[doc = "  \"anyOf\": ["]
+#[doc = "  \"oneOf\": ["]
 #[doc = "    {"]
-#[doc = "      \"type\": \"number\""]
+#[doc = "      \"$ref\": \"#/definitions/scaleField\""]
 #[doc = "    },"]
 #[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/signalRef\""]
+#[doc = "      \"$ref\": \"#/definitions/paramField\""]
+#[doc = "    },"]
+#[doc = "    {"]
+#[doc = "      \"$ref\": \"#/definitions/expr\""]
 #[doc = "    }"]
 #[doc = "  ]"]
 #[doc = "}"]
@@ -28221,37 +27509,38 @@ impl std::convert::TryFrom<String> for ForceTransformForcesItemVariant2Force {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum ForceTransformForcesItemVariant2Strength {
-    Variant0(f64),
-    Variant1(SignalRef),
+pub enum ForceTransformForcesItemId {
+    ScaleField(ScaleField),
+    ParamField(ParamField),
+    Expr(Expr),
 }
-impl From<&ForceTransformForcesItemVariant2Strength> for ForceTransformForcesItemVariant2Strength {
-    fn from(value: &ForceTransformForcesItemVariant2Strength) -> Self {
+impl From<&ForceTransformForcesItemId> for ForceTransformForcesItemId {
+    fn from(value: &ForceTransformForcesItemId) -> Self {
         value.clone()
     }
 }
-impl Default for ForceTransformForcesItemVariant2Strength {
-    fn default() -> Self {
-        ForceTransformForcesItemVariant2Strength::Variant0(-30_f64)
+impl From<ScaleField> for ForceTransformForcesItemId {
+    fn from(value: ScaleField) -> Self {
+        Self::ScaleField(value)
     }
 }
-impl From<f64> for ForceTransformForcesItemVariant2Strength {
-    fn from(value: f64) -> Self {
-        Self::Variant0(value)
+impl From<ParamField> for ForceTransformForcesItemId {
+    fn from(value: ParamField) -> Self {
+        Self::ParamField(value)
     }
 }
-impl From<SignalRef> for ForceTransformForcesItemVariant2Strength {
-    fn from(value: SignalRef) -> Self {
-        Self::Variant1(value)
+impl From<Expr> for ForceTransformForcesItemId {
+    fn from(value: Expr) -> Self {
+        Self::Expr(value)
     }
 }
-#[doc = "ForceTransformForcesItemVariant2Theta"]
+#[doc = "ForceTransformForcesItemIterations"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
 #[doc = r" ```json"]
 #[doc = "{"]
-#[doc = "  \"default\": 0.9,"]
+#[doc = "  \"default\": 1,"]
 #[doc = "  \"anyOf\": ["]
 #[doc = "    {"]
 #[doc = "      \"type\": \"number\""]
@@ -28265,37 +27554,36 @@ impl From<SignalRef> for ForceTransformForcesItemVariant2Strength {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum ForceTransformForcesItemVariant2Theta {
+pub enum ForceTransformForcesItemIterations {
     Variant0(f64),
     Variant1(SignalRef),
 }
-impl From<&ForceTransformForcesItemVariant2Theta> for ForceTransformForcesItemVariant2Theta {
-    fn from(value: &ForceTransformForcesItemVariant2Theta) -> Self {
+impl From<&ForceTransformForcesItemIterations> for ForceTransformForcesItemIterations {
+    fn from(value: &ForceTransformForcesItemIterations) -> Self {
         value.clone()
     }
 }
-impl Default for ForceTransformForcesItemVariant2Theta {
+impl Default for ForceTransformForcesItemIterations {
     fn default() -> Self {
-        ForceTransformForcesItemVariant2Theta::Variant0(0.9_f64)
+        ForceTransformForcesItemIterations::Variant0(1_f64)
     }
 }
-impl From<f64> for ForceTransformForcesItemVariant2Theta {
+impl From<f64> for ForceTransformForcesItemIterations {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for ForceTransformForcesItemVariant2Theta {
+impl From<SignalRef> for ForceTransformForcesItemIterations {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "ForceTransformForcesItemVariant3Distance"]
+#[doc = "ForceTransformForcesItemRadius"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
 #[doc = r" ```json"]
 #[doc = "{"]
-#[doc = "  \"default\": 30,"]
 #[doc = "  \"anyOf\": ["]
 #[doc = "    {"]
 #[doc = "      \"type\": \"number\""]
@@ -28315,152 +27603,44 @@ impl From<SignalRef> for ForceTransformForcesItemVariant2Theta {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum ForceTransformForcesItemVariant3Distance {
+pub enum ForceTransformForcesItemRadius {
     Variant0(f64),
     Variant1(SignalRef),
     Variant2(Expr),
     Variant3(ParamField),
 }
-impl From<&ForceTransformForcesItemVariant3Distance> for ForceTransformForcesItemVariant3Distance {
-    fn from(value: &ForceTransformForcesItemVariant3Distance) -> Self {
+impl From<&ForceTransformForcesItemRadius> for ForceTransformForcesItemRadius {
+    fn from(value: &ForceTransformForcesItemRadius) -> Self {
         value.clone()
     }
 }
-impl Default for ForceTransformForcesItemVariant3Distance {
-    fn default() -> Self {
-        ForceTransformForcesItemVariant3Distance::Variant0(30_f64)
-    }
-}
-impl From<f64> for ForceTransformForcesItemVariant3Distance {
+impl From<f64> for ForceTransformForcesItemRadius {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for ForceTransformForcesItemVariant3Distance {
+impl From<SignalRef> for ForceTransformForcesItemRadius {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-impl From<Expr> for ForceTransformForcesItemVariant3Distance {
+impl From<Expr> for ForceTransformForcesItemRadius {
     fn from(value: Expr) -> Self {
         Self::Variant2(value)
     }
 }
-impl From<ParamField> for ForceTransformForcesItemVariant3Distance {
+impl From<ParamField> for ForceTransformForcesItemRadius {
     fn from(value: ParamField) -> Self {
         Self::Variant3(value)
     }
 }
-#[doc = "ForceTransformForcesItemVariant3Force"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"enum\": ["]
-#[doc = "    \"link\""]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
-pub enum ForceTransformForcesItemVariant3Force {
-    #[serde(rename = "link")]
-    Link,
-}
-impl From<&ForceTransformForcesItemVariant3Force> for ForceTransformForcesItemVariant3Force {
-    fn from(value: &ForceTransformForcesItemVariant3Force) -> Self {
-        value.clone()
-    }
-}
-impl ToString for ForceTransformForcesItemVariant3Force {
-    fn to_string(&self) -> String {
-        match *self {
-            Self::Link => "link".to_string(),
-        }
-    }
-}
-impl std::str::FromStr for ForceTransformForcesItemVariant3Force {
-    type Err = self::error::ConversionError;
-    fn from_str(value: &str) -> Result<Self, self::error::ConversionError> {
-        match value {
-            "link" => Ok(Self::Link),
-            _ => Err("invalid value".into()),
-        }
-    }
-}
-impl std::convert::TryFrom<&str> for ForceTransformForcesItemVariant3Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &str) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<&String> for ForceTransformForcesItemVariant3Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<String> for ForceTransformForcesItemVariant3Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-#[doc = "ForceTransformForcesItemVariant3Id"]
+#[doc = "ForceTransformForcesItemStrength"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
 #[doc = r" ```json"]
 #[doc = "{"]
-#[doc = "  \"oneOf\": ["]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/scaleField\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/paramField\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/expr\""]
-#[doc = "    }"]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(untagged)]
-pub enum ForceTransformForcesItemVariant3Id {
-    ScaleField(ScaleField),
-    ParamField(ParamField),
-    Expr(Expr),
-}
-impl From<&ForceTransformForcesItemVariant3Id> for ForceTransformForcesItemVariant3Id {
-    fn from(value: &ForceTransformForcesItemVariant3Id) -> Self {
-        value.clone()
-    }
-}
-impl From<ScaleField> for ForceTransformForcesItemVariant3Id {
-    fn from(value: ScaleField) -> Self {
-        Self::ScaleField(value)
-    }
-}
-impl From<ParamField> for ForceTransformForcesItemVariant3Id {
-    fn from(value: ParamField) -> Self {
-        Self::ParamField(value)
-    }
-}
-impl From<Expr> for ForceTransformForcesItemVariant3Id {
-    fn from(value: Expr) -> Self {
-        Self::Expr(value)
-    }
-}
-#[doc = "ForceTransformForcesItemVariant3Iterations"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"default\": 1,"]
+#[doc = "  \"default\": 0.7,"]
 #[doc = "  \"anyOf\": ["]
 #[doc = "    {"]
 #[doc = "      \"type\": \"number\""]
@@ -28474,50 +27654,43 @@ impl From<Expr> for ForceTransformForcesItemVariant3Id {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum ForceTransformForcesItemVariant3Iterations {
+pub enum ForceTransformForcesItemStrength {
     Variant0(f64),
     Variant1(SignalRef),
 }
-impl From<&ForceTransformForcesItemVariant3Iterations>
-    for ForceTransformForcesItemVariant3Iterations
-{
-    fn from(value: &ForceTransformForcesItemVariant3Iterations) -> Self {
+impl From<&ForceTransformForcesItemStrength> for ForceTransformForcesItemStrength {
+    fn from(value: &ForceTransformForcesItemStrength) -> Self {
         value.clone()
     }
 }
-impl Default for ForceTransformForcesItemVariant3Iterations {
+impl Default for ForceTransformForcesItemStrength {
     fn default() -> Self {
-        ForceTransformForcesItemVariant3Iterations::Variant0(1_f64)
+        ForceTransformForcesItemStrength::Variant0(0.7_f64)
     }
 }
-impl From<f64> for ForceTransformForcesItemVariant3Iterations {
+impl From<f64> for ForceTransformForcesItemStrength {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for ForceTransformForcesItemVariant3Iterations {
+impl From<SignalRef> for ForceTransformForcesItemStrength {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "ForceTransformForcesItemVariant3Strength"]
+#[doc = "ForceTransformForcesItemTheta"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
 #[doc = r" ```json"]
 #[doc = "{"]
+#[doc = "  \"default\": 0.9,"]
 #[doc = "  \"anyOf\": ["]
 #[doc = "    {"]
 #[doc = "      \"type\": \"number\""]
 #[doc = "    },"]
 #[doc = "    {"]
 #[doc = "      \"$ref\": \"#/definitions/signalRef\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/expr\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/paramField\""]
 #[doc = "    }"]
 #[doc = "  ]"]
 #[doc = "}"]
@@ -28525,100 +27698,36 @@ impl From<SignalRef> for ForceTransformForcesItemVariant3Iterations {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum ForceTransformForcesItemVariant3Strength {
+pub enum ForceTransformForcesItemTheta {
     Variant0(f64),
     Variant1(SignalRef),
-    Variant2(Expr),
-    Variant3(ParamField),
 }
-impl From<&ForceTransformForcesItemVariant3Strength> for ForceTransformForcesItemVariant3Strength {
-    fn from(value: &ForceTransformForcesItemVariant3Strength) -> Self {
+impl From<&ForceTransformForcesItemTheta> for ForceTransformForcesItemTheta {
+    fn from(value: &ForceTransformForcesItemTheta) -> Self {
         value.clone()
     }
 }
-impl From<f64> for ForceTransformForcesItemVariant3Strength {
+impl Default for ForceTransformForcesItemTheta {
+    fn default() -> Self {
+        ForceTransformForcesItemTheta::Variant0(0.9_f64)
+    }
+}
+impl From<f64> for ForceTransformForcesItemTheta {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for ForceTransformForcesItemVariant3Strength {
+impl From<SignalRef> for ForceTransformForcesItemTheta {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-impl From<Expr> for ForceTransformForcesItemVariant3Strength {
-    fn from(value: Expr) -> Self {
-        Self::Variant2(value)
-    }
-}
-impl From<ParamField> for ForceTransformForcesItemVariant3Strength {
-    fn from(value: ParamField) -> Self {
-        Self::Variant3(value)
-    }
-}
-#[doc = "ForceTransformForcesItemVariant4Force"]
+#[doc = "ForceTransformForcesItemX"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
 #[doc = r" ```json"]
 #[doc = "{"]
-#[doc = "  \"enum\": ["]
-#[doc = "    \"x\""]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
-pub enum ForceTransformForcesItemVariant4Force {
-    #[serde(rename = "x")]
-    X,
-}
-impl From<&ForceTransformForcesItemVariant4Force> for ForceTransformForcesItemVariant4Force {
-    fn from(value: &ForceTransformForcesItemVariant4Force) -> Self {
-        value.clone()
-    }
-}
-impl ToString for ForceTransformForcesItemVariant4Force {
-    fn to_string(&self) -> String {
-        match *self {
-            Self::X => "x".to_string(),
-        }
-    }
-}
-impl std::str::FromStr for ForceTransformForcesItemVariant4Force {
-    type Err = self::error::ConversionError;
-    fn from_str(value: &str) -> Result<Self, self::error::ConversionError> {
-        match value {
-            "x" => Ok(Self::X),
-            _ => Err("invalid value".into()),
-        }
-    }
-}
-impl std::convert::TryFrom<&str> for ForceTransformForcesItemVariant4Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &str) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<&String> for ForceTransformForcesItemVariant4Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<String> for ForceTransformForcesItemVariant4Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-#[doc = "ForceTransformForcesItemVariant4Strength"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"default\": 0.1,"]
 #[doc = "  \"anyOf\": ["]
 #[doc = "    {"]
 #[doc = "      \"type\": \"number\""]
@@ -28632,140 +27741,31 @@ impl std::convert::TryFrom<String> for ForceTransformForcesItemVariant4Force {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum ForceTransformForcesItemVariant4Strength {
+pub enum ForceTransformForcesItemX {
     Variant0(f64),
     Variant1(SignalRef),
 }
-impl From<&ForceTransformForcesItemVariant4Strength> for ForceTransformForcesItemVariant4Strength {
-    fn from(value: &ForceTransformForcesItemVariant4Strength) -> Self {
+impl From<&ForceTransformForcesItemX> for ForceTransformForcesItemX {
+    fn from(value: &ForceTransformForcesItemX) -> Self {
         value.clone()
     }
 }
-impl Default for ForceTransformForcesItemVariant4Strength {
-    fn default() -> Self {
-        ForceTransformForcesItemVariant4Strength::Variant0(0.1_f64)
-    }
-}
-impl From<f64> for ForceTransformForcesItemVariant4Strength {
+impl From<f64> for ForceTransformForcesItemX {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for ForceTransformForcesItemVariant4Strength {
+impl From<SignalRef> for ForceTransformForcesItemX {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "ForceTransformForcesItemVariant4X"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"oneOf\": ["]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/scaleField\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/paramField\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/expr\""]
-#[doc = "    }"]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(untagged)]
-pub enum ForceTransformForcesItemVariant4X {
-    ScaleField(ScaleField),
-    ParamField(ParamField),
-    Expr(Expr),
-}
-impl From<&ForceTransformForcesItemVariant4X> for ForceTransformForcesItemVariant4X {
-    fn from(value: &ForceTransformForcesItemVariant4X) -> Self {
-        value.clone()
-    }
-}
-impl From<ScaleField> for ForceTransformForcesItemVariant4X {
-    fn from(value: ScaleField) -> Self {
-        Self::ScaleField(value)
-    }
-}
-impl From<ParamField> for ForceTransformForcesItemVariant4X {
-    fn from(value: ParamField) -> Self {
-        Self::ParamField(value)
-    }
-}
-impl From<Expr> for ForceTransformForcesItemVariant4X {
-    fn from(value: Expr) -> Self {
-        Self::Expr(value)
-    }
-}
-#[doc = "ForceTransformForcesItemVariant5Force"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"enum\": ["]
-#[doc = "    \"y\""]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
-pub enum ForceTransformForcesItemVariant5Force {
-    #[serde(rename = "y")]
-    Y,
-}
-impl From<&ForceTransformForcesItemVariant5Force> for ForceTransformForcesItemVariant5Force {
-    fn from(value: &ForceTransformForcesItemVariant5Force) -> Self {
-        value.clone()
-    }
-}
-impl ToString for ForceTransformForcesItemVariant5Force {
-    fn to_string(&self) -> String {
-        match *self {
-            Self::Y => "y".to_string(),
-        }
-    }
-}
-impl std::str::FromStr for ForceTransformForcesItemVariant5Force {
-    type Err = self::error::ConversionError;
-    fn from_str(value: &str) -> Result<Self, self::error::ConversionError> {
-        match value {
-            "y" => Ok(Self::Y),
-            _ => Err("invalid value".into()),
-        }
-    }
-}
-impl std::convert::TryFrom<&str> for ForceTransformForcesItemVariant5Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &str) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<&String> for ForceTransformForcesItemVariant5Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: &String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-impl std::convert::TryFrom<String> for ForceTransformForcesItemVariant5Force {
-    type Error = self::error::ConversionError;
-    fn try_from(value: String) -> Result<Self, self::error::ConversionError> {
-        value.parse()
-    }
-}
-#[doc = "ForceTransformForcesItemVariant5Strength"]
+#[doc = "ForceTransformForcesItemY"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
 #[doc = r""]
 #[doc = r" ```json"]
 #[doc = "{"]
-#[doc = "  \"default\": 0.1,"]
 #[doc = "  \"anyOf\": ["]
 #[doc = "    {"]
 #[doc = "      \"type\": \"number\""]
@@ -28779,77 +27779,25 @@ impl std::convert::TryFrom<String> for ForceTransformForcesItemVariant5Force {
 #[doc = r" </details>"]
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(untagged)]
-pub enum ForceTransformForcesItemVariant5Strength {
+pub enum ForceTransformForcesItemY {
     Variant0(f64),
     Variant1(SignalRef),
 }
-impl From<&ForceTransformForcesItemVariant5Strength> for ForceTransformForcesItemVariant5Strength {
-    fn from(value: &ForceTransformForcesItemVariant5Strength) -> Self {
+impl From<&ForceTransformForcesItemY> for ForceTransformForcesItemY {
+    fn from(value: &ForceTransformForcesItemY) -> Self {
         value.clone()
     }
 }
-impl Default for ForceTransformForcesItemVariant5Strength {
-    fn default() -> Self {
-        ForceTransformForcesItemVariant5Strength::Variant0(0.1_f64)
-    }
-}
-impl From<f64> for ForceTransformForcesItemVariant5Strength {
+impl From<f64> for ForceTransformForcesItemY {
     fn from(value: f64) -> Self {
         Self::Variant0(value)
     }
 }
-impl From<SignalRef> for ForceTransformForcesItemVariant5Strength {
+impl From<SignalRef> for ForceTransformForcesItemY {
     fn from(value: SignalRef) -> Self {
         Self::Variant1(value)
     }
 }
-#[doc = "ForceTransformForcesItemVariant5Y"]
-#[doc = r""]
-#[doc = r" <details><summary>JSON schema</summary>"]
-#[doc = r""]
-#[doc = r" ```json"]
-#[doc = "{"]
-#[doc = "  \"oneOf\": ["]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/scaleField\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/paramField\""]
-#[doc = "    },"]
-#[doc = "    {"]
-#[doc = "      \"$ref\": \"#/definitions/expr\""]
-#[doc = "    }"]
-#[doc = "  ]"]
-#[doc = "}"]
-#[doc = r" ```"]
-#[doc = r" </details>"]
-#[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(untagged)]
-pub enum ForceTransformForcesItemVariant5Y {
-    ScaleField(ScaleField),
-    ParamField(ParamField),
-    Expr(Expr),
-}
-impl From<&ForceTransformForcesItemVariant5Y> for ForceTransformForcesItemVariant5Y {
-    fn from(value: &ForceTransformForcesItemVariant5Y) -> Self {
-        value.clone()
-    }
-}
-impl From<ScaleField> for ForceTransformForcesItemVariant5Y {
-    fn from(value: ScaleField) -> Self {
-        Self::ScaleField(value)
-    }
-}
-impl From<ParamField> for ForceTransformForcesItemVariant5Y {
-    fn from(value: ParamField) -> Self {
-        Self::ParamField(value)
-    }
-}
-impl From<Expr> for ForceTransformForcesItemVariant5Y {
-    fn from(value: Expr) -> Self {
-        Self::Expr(value)
-    }
-}
 #[doc = "ForceTransformIterations"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]
@@ -99150,17 +98098,17 @@ pub mod defaults {
     pub(super) fn density_transform_minsteps() -> super::DensityTransformMinsteps {
         super::DensityTransformMinsteps::Variant0(25_f64)
     }
-    pub(super) fn density_transform_distribution_variant0_stdev(
-    ) -> super::DensityTransformDistributionVariant0Stdev {
-        super::DensityTransformDistributionVariant0Stdev::Variant0(1_f64)
+    pub(super) fn density_transform_distribution_lognormal_stdev(
+    ) -> super::DensityTransformDistributionStdev {
+        super::DensityTransformDistributionStdev::Variant0(1_f64)
     }
-    pub(super) fn density_transform_distribution_variant1_stdev(
-    ) -> super::DensityTransformDistributionVariant1Stdev {
-        super::DensityTransformDistributionVariant1Stdev::Variant0(1_f64)
+    pub(super) fn density_transform_distribution_normal_stdev(
+    ) -> super::DensityTransformDistributionStdev {
+        super::DensityTransformDistributionStdev::Variant0(1_f64)
     }
-    pub(super) fn density_transform_distribution_variant2_max(
-    ) -> super::DensityTransformDistributionVariant2Max {
-        super::DensityTransformDistributionVariant2Max::Variant0(1_f64)
+    pub(super) fn density_transform_distribution_uniform_max(
+    ) -> super::DensityTransformDistributionMax {
+        super::DensityTransformDistributionMax::Variant0(1_f64)
     }
     pub(super) fn dotbin_transform_as() -> super::DotbinTransformAs {
         super::DotbinTransformAs::Variant0("bin".to_string())
@@ -99191,41 +98139,41 @@ pub mod defaults {
     pub(super) fn force_transform_velocity_decay() -> super::ForceTransformVelocityDecay {
         super::ForceTransformVelocityDecay::Variant0(0.4_f64)
     }
-    pub(super) fn force_transform_forces_item_variant1_iterations(
-    ) -> super::ForceTransformForcesItemVariant1Iterations {
-        super::ForceTransformForcesItemVariant1Iterations::Variant0(1_f64)
+    pub(super) fn force_transform_forces_item_collide_iterations(
+    ) -> super::ForceTransformForcesItemIterations {
+        super::ForceTransformForcesItemIterations::Variant0(1_f64)
     }
-    pub(super) fn force_transform_forces_item_variant1_strength(
-    ) -> super::ForceTransformForcesItemVariant1Strength {
-        super::ForceTransformForcesItemVariant1Strength::Variant0(0.7_f64)
+    pub(super) fn force_transform_forces_item_collide_strength(
+    ) -> super::ForceTransformForcesItemStrength {
+        super::ForceTransformForcesItemStrength::Variant0(0.7_f64)
     }
-    pub(super) fn force_transform_forces_item_variant2_distance_min(
-    ) -> super::ForceTransformForcesItemVariant2DistanceMin {
-        super::ForceTransformForcesItemVariant2DistanceMin::Variant0(1_f64)
+    pub(super) fn force_transform_forces_item_link_distance(
+    ) -> super::ForceTransformForcesItemDistance {
+        super::ForceTransformForcesItemDistance::Variant0(30_f64)
     }
-    pub(super) fn force_transform_forces_item_variant2_strength(
-    ) -> super::ForceTransformForcesItemVariant2Strength {
-        super::ForceTransformForcesItemVariant2Strength::Variant0(-30_f64)
+    pub(super) fn force_transform_forces_item_link_iterations(
+    ) -> super::ForceTransformForcesItemIterations {
+        super::ForceTransformForcesItemIterations::Variant0(1_f64)
     }
-    pub(super) fn force_transform_forces_item_variant2_theta(
-    ) -> super::ForceTransformForcesItemVariant2Theta {
-        super::ForceTransformForcesItemVariant2Theta::Variant0(0.9_f64)
+    pub(super) fn force_transform_forces_item_nbody_distance_min(
+    ) -> super::ForceTransformForcesItemDistanceMin {
+        super::ForceTransformForcesItemDistanceMin::Variant0(1_f64)
     }
-    pub(super) fn force_transform_forces_item_variant3_distance(
-    ) -> super::ForceTransformForcesItemVariant3Distance {
-        super::ForceTransformForcesItemVariant3Distance::Variant0(30_f64)
+    pub(super) fn force_transform_forces_item_nbody_strength(
+    ) -> super::ForceTransformForcesItemStrength {
+        super::ForceTransformForcesItemStrength::Variant0(-30_f64)
     }
-    pub(super) fn force_transform_forces_item_variant3_iterations(
-    ) -> super::ForceTransformForcesItemVariant3Iterations {
-        super::ForceTransformForcesItemVariant3Iterations::Variant0(1_f64)
+    pub(super) fn force_transform_forces_item_nbody_theta() -> super::ForceTransformForcesItemTheta
+    {
+        super::ForceTransformForcesItemTheta::Variant0(0.9_f64)
     }
-    pub(super) fn force_transform_forces_item_variant4_strength(
-    ) -> super::ForceTransformForcesItemVariant4Strength {
-        super::ForceTransformForcesItemVariant4Strength::Variant0(0.1_f64)
+    pub(super) fn force_transform_forces_item_x_strength() -> super::ForceTransformForcesItemStrength
+    {
+        super::ForceTransformForcesItemStrength::Variant0(0.1_f64)
     }
-    pub(super) fn force_transform_forces_item_variant5_strength(
-    ) -> super::ForceTransformForcesItemVariant5Strength {
-        super::ForceTransformForcesItemVariant5Strength::Variant0(0.1_f64)
+    pub(super) fn force_transform_forces_item_y_strength() -> super::ForceTransformForcesItemStrength
+    {
+        super::ForceTransformForcesItemStrength::Variant0(0.1_f64)
     }
     pub(super) fn geopath_transform_as() -> super::GeopathTransformAs {
         super::GeopathTransformAs::Variant0("path".to_string())
diff --git a/typify-test/Cargo.toml b/typify-test/Cargo.toml
index 1b41189..6677b56 100644
--- a/typify-test/Cargo.toml
+++ b/typify-test/Cargo.toml
@@ -5,13 +5,13 @@ edition = "2021"
 
 [dependencies]
 regress = "0.7.1"
-serde = "1.0.193"
+serde = "1.0.196"
 serde_json = "1.0.113"
 
 [build-dependencies]
 ipnetwork = { version = "0.20.0", features = ["schemars"] }
 prettyplease = "0.2.16"
 schemars = "0.8.16"
-serde = "1.0.193"
+serde = "1.0.196"
 syn = "2.0.43"
 typify = { path = "../typify" }
diff --git a/typify/tests/schemas/various-enums.json b/typify/tests/schemas/various-enums.json
index 35c38e2..874b156 100644
--- a/typify/tests/schemas/various-enums.json
+++ b/typify/tests/schemas/various-enums.json
@@ -188,6 +188,76 @@
           ]
         }
       ]
+    },
+    "enum-and-constant": {
+      "oneOf": [
+        {
+          "type": "object",
+          "required": [
+            "petType",
+            "bark"
+          ],
+          "properties": {
+            "petType": {
+              "type": "string",
+              "enum": [
+                "dog"
+              ]
+            },
+            "bark": {
+              "type": "string"
+            }
+          }
+        },
+        {
+          "type": "object",
+          "required": [
+            "petType",
+            "purr"
+          ],
+          "properties": {
+            "petType": {
+              "type": "string",
+              "const": "cat"
+            },
+            "purr": {
+              "type": "string"
+            }
+          }
+        },
+        {
+          "type": "object",
+          "required": [
+            "petType",
+            "help"
+          ],
+          "properties": {
+            "petType": {
+              "const": "monkey"
+            },
+            "help": {
+              "type": "string"
+            }
+          }
+        },
+        {
+          "type": "object",
+          "required": [
+            "petType",
+            "float"
+          ],
+          "properties": {
+            "petType": {
+              "enum": [
+                "fish"
+              ]
+            },
+            "float": {
+              "type": "string"
+            }
+          }
+        }
+      ]
     }
   }
 }
\ No newline at end of file
diff --git a/typify/tests/schemas/various-enums.rs b/typify/tests/schemas/various-enums.rs
index aafca06..4934278 100644
--- a/typify/tests/schemas/various-enums.rs
+++ b/typify/tests/schemas/various-enums.rs
@@ -286,6 +286,100 @@ impl<'de> serde::Deserialize<'de> for EmptyObjectProp {
         .map_err(|e| <D::Error as serde::de::Error>::custom(e.to_string()))
     }
 }
+#[doc = "EnumAndConstant"]
+#[doc = r""]
+#[doc = r" <details><summary>JSON schema</summary>"]
+#[doc = r""]
+#[doc = r" ```json"]
+#[doc = "{"]
+#[doc = "  \"oneOf\": ["]
+#[doc = "    {"]
+#[doc = "      \"type\": \"object\","]
+#[doc = "      \"required\": ["]
+#[doc = "        \"bark\","]
+#[doc = "        \"petType\""]
+#[doc = "      ],"]
+#[doc = "      \"properties\": {"]
+#[doc = "        \"bark\": {"]
+#[doc = "          \"type\": \"string\""]
+#[doc = "        },"]
+#[doc = "        \"petType\": {"]
+#[doc = "          \"type\": \"string\","]
+#[doc = "          \"enum\": ["]
+#[doc = "            \"dog\""]
+#[doc = "          ]"]
+#[doc = "        }"]
+#[doc = "      }"]
+#[doc = "    },"]
+#[doc = "    {"]
+#[doc = "      \"type\": \"object\","]
+#[doc = "      \"required\": ["]
+#[doc = "        \"petType\","]
+#[doc = "        \"purr\""]
+#[doc = "      ],"]
+#[doc = "      \"properties\": {"]
+#[doc = "        \"petType\": {"]
+#[doc = "          \"type\": \"string\","]
+#[doc = "          \"const\": \"cat\""]
+#[doc = "        },"]
+#[doc = "        \"purr\": {"]
+#[doc = "          \"type\": \"string\""]
+#[doc = "        }"]
+#[doc = "      }"]
+#[doc = "    },"]
+#[doc = "    {"]
+#[doc = "      \"type\": \"object\","]
+#[doc = "      \"required\": ["]
+#[doc = "        \"help\","]
+#[doc = "        \"petType\""]
+#[doc = "      ],"]
+#[doc = "      \"properties\": {"]
+#[doc = "        \"help\": {"]
+#[doc = "          \"type\": \"string\""]
+#[doc = "        },"]
+#[doc = "        \"petType\": {"]
+#[doc = "          \"const\": \"monkey\""]
+#[doc = "        }"]
+#[doc = "      }"]
+#[doc = "    },"]
+#[doc = "    {"]
+#[doc = "      \"type\": \"object\","]
+#[doc = "      \"required\": ["]
+#[doc = "        \"float\","]
+#[doc = "        \"petType\""]
+#[doc = "      ],"]
+#[doc = "      \"properties\": {"]
+#[doc = "        \"float\": {"]
+#[doc = "          \"type\": \"string\""]
+#[doc = "        },"]
+#[doc = "        \"petType\": {"]
+#[doc = "          \"enum\": ["]
+#[doc = "            \"fish\""]
+#[doc = "          ]"]
+#[doc = "        }"]
+#[doc = "      }"]
+#[doc = "    }"]
+#[doc = "  ]"]
+#[doc = "}"]
+#[doc = r" ```"]
+#[doc = r" </details>"]
+#[derive(Clone, Debug, Deserialize, Serialize)]
+#[serde(tag = "petType")]
+pub enum EnumAndConstant {
+    #[serde(rename = "dog")]
+    Dog { bark: String },
+    #[serde(rename = "cat")]
+    Cat { purr: String },
+    #[serde(rename = "monkey")]
+    Monkey { help: String },
+    #[serde(rename = "fish")]
+    Fish { float: String },
+}
+impl From<&EnumAndConstant> for EnumAndConstant {
+    fn from(value: &EnumAndConstant) -> Self {
+        value.clone()
+    }
+}
 #[doc = "IpNet"]
 #[doc = r""]
 #[doc = r" <details><summary>JSON schema</summary>"]