Pārlūkot izejas kodu

fix: tool provider description should not be optional

Yeuoly 8 mēneši atpakaļ
vecāks
revīzija
ee5ff58d60

+ 2 - 3
internal/types/entities/plugin_entities/plugin_declaration.go

@@ -298,9 +298,8 @@ func (p *PluginDeclaration) ManifestValidate() error {
 
 func (p *PluginDeclaration) FillInDefaultValues() {
 	if p.Tool != nil {
-		if p.Tool.Identity.Description == nil {
-			deep_copied_description := p.Description
-			p.Tool.Identity.Description = &deep_copied_description
+		if p.Tool.Identity.Description.EnUS == "" {
+			p.Tool.Identity.Description = p.Description
 		}
 
 		if len(p.Tool.Identity.Tags) == 0 {

+ 1 - 1
internal/types/entities/plugin_entities/tool_declaration.go

@@ -117,7 +117,7 @@ func init() {
 type ToolProviderIdentity struct {
 	Author      string      `json:"author" validate:"required"`
 	Name        string      `json:"name" validate:"required"`
-	Description *I18nObject `json:"description" validate:"omitempty"`
+	Description I18nObject  `json:"description"`
 	Icon        string      `json:"icon" validate:"required"`
 	Label       I18nObject  `json:"label" validate:"required"`
 	Tags        []PluginTag `json:"tags" validate:"required,dive,plugin_tag"`