diff --git a/src/function.rs b/src/function.rs index f98bf092..70c1d62b 100644 --- a/src/function.rs +++ b/src/function.rs @@ -106,17 +106,21 @@ pub struct FunctionDeclaration { #[derive(Debug, Clone, Serialize, Deserialize)] pub struct JsonSchema { - #[serde(rename = "type")] - pub type_value: String, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub type_value: Option, #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, #[serde(skip_serializing_if = "Option::is_none")] pub properties: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub items: Option>, + #[serde(rename = "anyOf", skip_serializing_if = "Option::is_none")] + pub any_of: Option>, #[serde(rename = "enum", skip_serializing_if = "Option::is_none")] pub enum_value: Option>, #[serde(skip_serializing_if = "Option::is_none")] + pub default: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub required: Option>, }