chore: replace all cn comments to en version by volc api (#313)
This commit is contained in:
@@ -261,7 +261,7 @@ func (op *Openapi3Operation) ToEinoSchemaParameterInfo(ctx context.Context) (map
|
||||
result[paramName] = paramInfo
|
||||
}
|
||||
|
||||
break // 只取一种 MIME
|
||||
break // Take only one MIME.
|
||||
}
|
||||
|
||||
return result, nil
|
||||
@@ -375,8 +375,8 @@ func validateOpenapi3Responses(responses openapi3.Responses) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// default status 不处理
|
||||
// 只处理 '200' status
|
||||
// Default status not processed
|
||||
// Only process' 200 'status
|
||||
if len(responses) != 1 {
|
||||
if len(responses) != 2 {
|
||||
return errorx.New(errno.ErrPluginInvalidOpenapi3Doc, errorx.KV(errno.PluginMsgKey,
|
||||
|
||||
@@ -341,7 +341,7 @@ type AuthV2 struct {
|
||||
}
|
||||
|
||||
func (au *AuthV2) UnmarshalJSON(data []byte) error {
|
||||
auth := &Auth{} // 兼容老数据
|
||||
auth := &Auth{} // Compatible with old data
|
||||
err := json.Unmarshal(data, auth)
|
||||
if err != nil {
|
||||
return errorx.WrapByCode(err, errno.ErrPluginInvalidManifest, errorx.KV(errno.PluginMsgKey,
|
||||
@@ -381,7 +381,7 @@ func (au *AuthV2) UnmarshalJSON(data []byte) error {
|
||||
}
|
||||
|
||||
func (au *AuthV2) unmarshalService(auth *Auth) (err error) {
|
||||
if au.SubType == "" && au.Payload == "" { // 兼容老数据
|
||||
if au.SubType == "" && au.Payload == "" { // Compatible with old data
|
||||
au.SubType = AuthzSubTypeOfServiceAPIToken
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ func (au *AuthV2) unmarshalService(auth *Auth) (err error) {
|
||||
}
|
||||
|
||||
func (au *AuthV2) unmarshalOAuth(auth *Auth) (err error) {
|
||||
if au.SubType == "" { // 兼容老数据
|
||||
if au.SubType == "" { // Compatible with old data
|
||||
au.SubType = AuthzSubTypeOfOAuthAuthorizationCode
|
||||
}
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ func (t ToolInfo) ToReqAPIParameter() ([]*common.APIParameter, error) {
|
||||
params = append(params, apiParam)
|
||||
}
|
||||
|
||||
break // 只取一种 MIME
|
||||
break // Take only one MIME.
|
||||
}
|
||||
|
||||
return params, nil
|
||||
@@ -257,7 +257,7 @@ func toAPIParameter(paramMeta paramMetaInfo, sc *openapi3.Schema) (*common.APIPa
|
||||
Name: paramMeta.name,
|
||||
Desc: paramMeta.desc,
|
||||
Type: apiType,
|
||||
Location: location, // 使用父节点的值
|
||||
Location: location, // Using the value of the parent node
|
||||
IsRequired: paramMeta.required,
|
||||
SubParameters: []*common.APIParameter{},
|
||||
}
|
||||
@@ -453,7 +453,7 @@ func (t ToolInfo) ToPluginParameters() ([]*common.PluginParameter, error) {
|
||||
}
|
||||
}
|
||||
|
||||
break // 只取一种 MIME
|
||||
break // Take only one MIME.
|
||||
}
|
||||
|
||||
return params, nil
|
||||
|
||||
Reference in New Issue
Block a user