feat(plugin): remove schema retriction for plugin server url (#278)

This commit is contained in:
mrh997
2025-07-31 11:07:57 +08:00
committed by GitHub
parent 30fd1b3e27
commit c4e0e27702
2 changed files with 3 additions and 10 deletions

View File

@@ -30,6 +30,7 @@ import (
"github.com/coze-dev/coze-studio/backend/pkg/lang/slices"
"github.com/coze-dev/coze-studio/backend/pkg/logs"
"github.com/coze-dev/coze-studio/backend/types/errno"
"github.com/cloudwego/eino/schema"
)
@@ -65,10 +66,6 @@ func (ot Openapi3T) Validate(ctx context.Context) (err error) {
return errorx.New(errno.ErrPluginInvalidOpenapi3Doc, errorx.KVf(errno.PluginMsgKey,
"invalid server url '%s'", serverURL))
}
if urlSchema.Scheme != "https" {
return errorx.New(errno.ErrPluginInvalidOpenapi3Doc, errorx.KV(errno.PluginMsgKey,
"server url must start with 'https://'"))
}
if urlSchema.Host == "" {
return errorx.New(errno.ErrPluginInvalidOpenapi3Doc, errorx.KVf(errno.PluginMsgKey,
"invalid server url '%s'", serverURL))