diff --git a/.generator/src/generator/templates/model_simple.j2 b/.generator/src/generator/templates/model_simple.j2 index f171abb30..86d14392f 100644 --- a/.generator/src/generator/templates/model_simple.j2 +++ b/.generator/src/generator/templates/model_simple.j2 @@ -16,6 +16,9 @@ pub struct {{ name }} { {%- endif %} {%- if schema.deprecated %} #[deprecated] +{%- endif %} +{%- if required and nullable %} + #[serialize_always] {%- endif %} #[serde(rename = "{{ attr }}"{% if not required and nullable%}, default, with = "::serde_with::rust::double_option"{% endif %})] pub {{propertyName}}: {{dataType}}, diff --git a/src/datadogV1/model/model_shared_dashboard_update_request.rs b/src/datadogV1/model/model_shared_dashboard_update_request.rs index 982741e15..030be7ded 100644 --- a/src/datadogV1/model/model_shared_dashboard_update_request.rs +++ b/src/datadogV1/model/model_shared_dashboard_update_request.rs @@ -10,6 +10,7 @@ use serde_with::skip_serializing_none; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SharedDashboardUpdateRequest { /// Timeframe setting for the shared dashboard. + #[serialize_always] #[serde(rename = "global_time")] pub global_time: Option, /// Whether to allow viewers to select a different global time setting for the shared dashboard. diff --git a/src/datadogV2/model/model_incident_create_relationships.rs b/src/datadogV2/model/model_incident_create_relationships.rs index 749ea0ae1..1eb6e6c48 100644 --- a/src/datadogV2/model/model_incident_create_relationships.rs +++ b/src/datadogV2/model/model_incident_create_relationships.rs @@ -10,6 +10,7 @@ use serde_with::skip_serializing_none; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IncidentCreateRelationships { /// Relationship to user. + #[serialize_always] #[serde(rename = "commander_user")] pub commander_user: Option, } diff --git a/src/datadogV2/model/model_logs_archive_attributes.rs b/src/datadogV2/model/model_logs_archive_attributes.rs index 49b3bfb58..000dc165f 100644 --- a/src/datadogV2/model/model_logs_archive_attributes.rs +++ b/src/datadogV2/model/model_logs_archive_attributes.rs @@ -10,6 +10,7 @@ use serde_with::skip_serializing_none; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsArchiveAttributes { /// An archive's destination. + #[serialize_always] #[serde(rename = "destination")] pub destination: Option, /// To store the tags in the archive, set the value "true". diff --git a/src/datadogV2/model/model_nullable_relationship_to_user.rs b/src/datadogV2/model/model_nullable_relationship_to_user.rs index 650ff85e8..c7acda0f6 100644 --- a/src/datadogV2/model/model_nullable_relationship_to_user.rs +++ b/src/datadogV2/model/model_nullable_relationship_to_user.rs @@ -10,6 +10,7 @@ use serde_with::skip_serializing_none; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct NullableRelationshipToUser { /// Relationship to user object. + #[serialize_always] #[serde(rename = "data")] pub data: Option, }