Skip to content

Commit ef2fe1b

Browse files
Jefftreefenollp
andauthored
openapi3: fix error phrase in security scheme (#745)
Co-authored-by: Pierre Fenoll <[email protected]>
1 parent 3077c08 commit ef2fe1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openapi3/security_scheme.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func (ss *SecurityScheme) Validate(ctx context.Context, opts ...ValidationOption
194194
} else if len(ss.In) > 0 {
195195
return fmt.Errorf("security scheme of type %q can't have 'in'", ss.Type)
196196
} else if len(ss.Name) > 0 {
197-
return errors.New("security scheme of type 'apiKey' can't have 'name'")
197+
return fmt.Errorf("security scheme of type %q can't have 'name'", ss.Type)
198198
}
199199

200200
// Validate "format"

0 commit comments

Comments
 (0)