fix(plugin): ToEinoSchemaParameterInfo nil panic (#832)

This commit is contained in:
mrh997 2025-08-20 15:21:15 +08:00 committed by GitHub
parent 1dc00e4df8
commit a4b11729a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -255,6 +255,9 @@ func (op *Openapi3Operation) ToEinoSchemaParameterInfo(ctx context.Context) (map
if err != nil { if err != nil {
return nil, err return nil, err
} }
if paramInfo == nil {
continue
}
if _, ok := result[paramName]; ok { if _, ok := result[paramName]; ok {
logs.CtxWarnf(ctx, "duplicate parameter name '%s'", paramName) logs.CtxWarnf(ctx, "duplicate parameter name '%s'", paramName)