Przeglądaj źródła

fix: avoid empty tool provider tags

Yeuoly 8 miesięcy temu
rodzic
commit
947252609e

+ 8 - 0
internal/types/entities/plugin_entities/tool_declaration.go

@@ -217,6 +217,10 @@ func (t *ToolProviderDeclaration) UnmarshalYAML(value *yaml.Node) error {
 		t.Tools = []ToolDeclaration{}
 	}
 
+	if t.Identity.Tags == nil {
+		t.Identity.Tags = []manifest_entities.PluginTag{}
+	}
+
 	return nil
 }
 
@@ -279,6 +283,10 @@ func (t *ToolProviderDeclaration) UnmarshalJSON(data []byte) error {
 		t.Tools = []ToolDeclaration{}
 	}
 
+	if t.Identity.Tags == nil {
+		t.Identity.Tags = []manifest_entities.PluginTag{}
+	}
+
 	return nil
 }