Files
oikos/vendor/github.com/getkin/kin-openapi/openapi3/example_validation.go
dtoro febc153b7f
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled
ci / web (push) Has been cancelled
Desktop App / Build Linux (amd64) (push) Has been cancelled
Desktop App / Attach to Release (push) Has been cancelled
fix: add involves edge from task to agent:nomos at creation
Plus sync vendor directory for Docker build compatibility.
2026-08-11 22:03:12 +02:00

21 lines
493 B
Go

package openapi3
import "context"
func validateExampleValue(ctx context.Context, input any, schema *Schema) error {
opts := []SchemaValidationOption{MultiErrors()}
vo := getValidationOptions(ctx)
if vo.examplesValidationAsReq {
opts = append(opts, VisitAsRequest())
} else if vo.examplesValidationAsRes {
opts = append(opts, VisitAsResponse())
}
if vo.jsonSchema2020ValidationEnabled {
opts = append(opts, EnableJSONSchema2020())
}
return schema.VisitJSON(input, opts...)
}