Detailed changes
@@ -92,6 +92,7 @@ actions!(
#[derive(Default, Clone, PartialEq, Deserialize, JsonSchema, Action)]
#[action(namespace = agent)]
+#[serde(deny_unknown_fields)]
pub struct NewThread {
#[serde(default)]
from_thread_id: Option<ThreadId>,
@@ -99,6 +100,7 @@ pub struct NewThread {
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
#[action(namespace = agent)]
+#[serde(deny_unknown_fields)]
pub struct ManageProfiles {
#[serde(default)]
pub customize_tools: Option<AgentProfileId>,
@@ -65,6 +65,7 @@ actions!(
#[derive(Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Action)]
#[action(namespace = git, deprecated_aliases = ["editor::RevertFile"])]
+#[serde(deny_unknown_fields)]
pub struct RestoreFile {
#[serde(default)]
pub skip_prompt: bool,
@@ -16,9 +16,11 @@ fn test_action_macros() {
#[derive(PartialEq, Clone, Deserialize, JsonSchema, Action)]
#[action(namespace = test_only)]
- struct AnotherSomeAction;
+ #[serde(deny_unknown_fields)]
+ struct AnotherAction;
#[derive(PartialEq, Clone, gpui::private::serde_derive::Deserialize)]
+ #[serde(deny_unknown_fields)]
struct RegisterableAction {}
register_action!(RegisterableAction);
@@ -31,6 +31,7 @@ impl FeatureFlag for SettingsUiFeatureFlag {
#[derive(Copy, Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Action)]
#[action(namespace = zed)]
+#[serde(deny_unknown_fields)]
pub struct ImportVsCodeSettings {
#[serde(default)]
pub skip_prompt: bool,
@@ -38,6 +39,7 @@ pub struct ImportVsCodeSettings {
#[derive(Copy, Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Action)]
#[action(namespace = zed)]
+#[serde(deny_unknown_fields)]
pub struct ImportCursorSettings {
#[serde(default)]
pub skip_prompt: bool,
@@ -288,6 +288,7 @@ actions!(
#[derive(Default, PartialEq, Eq, Clone, Deserialize, JsonSchema, Action)]
#[action(namespace = file_finder, name = "Toggle")]
+#[serde(deny_unknown_fields)]
pub struct ToggleFileFinder {
#[serde(default)]
pub separate_history: bool,
@@ -58,6 +58,7 @@ pub enum ExtensionCategoryFilter {
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
#[action(namespace = zed)]
+#[serde(deny_unknown_fields)]
pub struct Extensions {
/// Filters the extensions page down to extensions that are in the specified category.
#[serde(default)]
@@ -66,6 +67,7 @@ pub struct Extensions {
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
#[action(namespace = zed)]
+#[serde(deny_unknown_fields)]
pub struct DecreaseBufferFontSize {
#[serde(default)]
pub persist: bool,
@@ -73,6 +75,7 @@ pub struct DecreaseBufferFontSize {
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
#[action(namespace = zed)]
+#[serde(deny_unknown_fields)]
pub struct IncreaseBufferFontSize {
#[serde(default)]
pub persist: bool,
@@ -80,6 +83,7 @@ pub struct IncreaseBufferFontSize {
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
#[action(namespace = zed)]
+#[serde(deny_unknown_fields)]
pub struct ResetBufferFontSize {
#[serde(default)]
pub persist: bool,
@@ -87,6 +91,7 @@ pub struct ResetBufferFontSize {
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
#[action(namespace = zed)]
+#[serde(deny_unknown_fields)]
pub struct DecreaseUiFontSize {
#[serde(default)]
pub persist: bool,
@@ -94,6 +99,7 @@ pub struct DecreaseUiFontSize {
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
#[action(namespace = zed)]
+#[serde(deny_unknown_fields)]
pub struct IncreaseUiFontSize {
#[serde(default)]
pub persist: bool,
@@ -101,6 +107,7 @@ pub struct IncreaseUiFontSize {
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
#[action(namespace = zed)]
+#[serde(deny_unknown_fields)]
pub struct ResetUiFontSize {
#[serde(default)]
pub persist: bool,