go.mod: bump github.com/getkin/kin-openapi to v0.131.0
As deepmap/oapi-codegen didn't work with this newer version, upgrade to oapi-codegen/oapi-codegen v2. Mitigating CVE-2025-30153
This commit is contained in:
parent
c5cb0d0618
commit
b2700903ae
403 changed files with 44758 additions and 16347 deletions
16
vendor/github.com/getkin/kin-openapi/openapi3/example_validation.go
generated
vendored
Normal file
16
vendor/github.com/getkin/kin-openapi/openapi3/example_validation.go
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package openapi3
|
||||
|
||||
import "context"
|
||||
|
||||
func validateExampleValue(ctx context.Context, input any, schema *Schema) error {
|
||||
opts := make([]SchemaValidationOption, 0, 2)
|
||||
|
||||
if vo := getValidationOptions(ctx); vo.examplesValidationAsReq {
|
||||
opts = append(opts, VisitAsRequest())
|
||||
} else if vo.examplesValidationAsRes {
|
||||
opts = append(opts, VisitAsResponse())
|
||||
}
|
||||
opts = append(opts, MultiErrors())
|
||||
|
||||
return schema.VisitJSON(input, opts...)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue