diff --git a/core/tauri-build/src/plugin.rs b/core/tauri-build/src/plugin.rs index cd2b47c74..aa5b3f71b 100644 --- a/core/tauri-build/src/plugin.rs +++ b/core/tauri-build/src/plugin.rs @@ -25,7 +25,7 @@ pub fn set_manifest(mut manifest: Manifest) { manifest.capabilities.push(Capability { id: feature_capability_id, component: None, - description: format!("Allows the {feature} functionality"), + description: Some(format!("Allows the {feature} functionality")), features: vec![feature.clone()], scope: Default::default(), }); diff --git a/core/tauri-config-schema/schema.json b/core/tauri-config-schema/schema.json index cc4bfb6d7..6bd374525 100644 --- a/core/tauri-config-schema/schema.json +++ b/core/tauri-config-schema/schema.json @@ -2272,7 +2272,6 @@ "type": "object", "required": [ "capabilities", - "description", "id", "members" ], @@ -2283,7 +2282,10 @@ }, "description": { "description": "Describes the namespace in a human readable format.", - "type": "string" + "type": [ + "string", + "null" + ] }, "members": { "description": "The windows that can use the configuration of this namespace.", diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index f37edd0ce..1c5ddd1a0 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -1932,7 +1932,7 @@ pub struct Namespace { /// It is recommended to use `drop-` or `allow-` prefixes to ensure the rule can be easily categorized. pub id: String, /// Describes the namespace in a human readable format. - pub description: String, + pub description: Option, /// The windows that can use the configuration of this namespace. pub members: Vec, /// List of capabilities attached to this namespace. @@ -2670,7 +2670,7 @@ mod build { impl ToTokens for Namespace { fn to_tokens(&self, tokens: &mut TokenStream) { let id = str_lit(&self.id); - let description = str_lit(&self.description); + let description = opt_str_lit(self.description.as_ref()); let members = vec_lit(&self.members, str_lit); let capabilities = vec_lit(&self.capabilities, str_lit); diff --git a/core/tauri-utils/src/plugin.rs b/core/tauri-utils/src/plugin.rs index ad5b32c0a..9b94bd032 100644 --- a/core/tauri-utils/src/plugin.rs +++ b/core/tauri-utils/src/plugin.rs @@ -44,7 +44,7 @@ pub struct Capability { /// When no value is set, it referes to the application itself. pub component: Option, /// Describes the capability in a human readable format. - pub description: String, + pub description: Option, /// List of features enabled by this capability. #[serde(default)] pub features: Vec, diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index cc4bfb6d7..6bd374525 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -2272,7 +2272,6 @@ "type": "object", "required": [ "capabilities", - "description", "id", "members" ], @@ -2283,7 +2282,10 @@ }, "description": { "description": "Describes the namespace in a human readable format.", - "type": "string" + "type": [ + "string", + "null" + ] }, "members": { "description": "The windows that can use the configuration of this namespace.",