Update all dependencies

Note: should we ditch vendoring?

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2025-09-29 10:20:26 +00:00 committed by Gabriel
parent 22fde8d30e
commit 0093393bc3
371 changed files with 91052 additions and 25816 deletions

View file

@ -27,6 +27,25 @@ type exampleValidator struct {
schemaOptions *SchemaValidatorOptions
}
// Validate validates the example values declared in the swagger spec
// Example values MUST conform to their schema.
//
// With Swagger 2.0, examples are supported in:
// - schemas
// - individual property
// - responses
func (ex *exampleValidator) Validate() *Result {
errs := pools.poolOfResults.BorrowResult()
if ex == nil || ex.SpecValidator == nil {
return errs
}
ex.resetVisited()
errs.Merge(ex.validateExampleValueValidAgainstSchema()) // error -
return errs
}
// resetVisited resets the internal state of visited schemas
func (ex *exampleValidator) resetVisited() {
if ex.visitedSchemas == nil {
@ -51,25 +70,6 @@ func (ex *exampleValidator) isVisited(path string) bool {
return isVisited(path, ex.visitedSchemas)
}
// Validate validates the example values declared in the swagger spec
// Example values MUST conform to their schema.
//
// With Swagger 2.0, examples are supported in:
// - schemas
// - individual property
// - responses
func (ex *exampleValidator) Validate() *Result {
errs := pools.poolOfResults.BorrowResult()
if ex == nil || ex.SpecValidator == nil {
return errs
}
ex.resetVisited()
errs.Merge(ex.validateExampleValueValidAgainstSchema()) // error -
return errs
}
func (ex *exampleValidator) validateExampleValueValidAgainstSchema() *Result {
// every example value that is specified must validate against the schema for that property
// in: schemas, properties, object, items
@ -278,7 +278,7 @@ func (ex *exampleValidator) validateExampleValueSchemaAgainstSchema(path, in str
// TODO: Temporary duplicated code. Need to refactor with examples
//
func (ex *exampleValidator) validateExampleValueItemsAgainstSchema(path, in string, root interface{}, items *spec.Items) *Result {
func (ex *exampleValidator) validateExampleValueItemsAgainstSchema(path, in string, root any, items *spec.Items) *Result {
res := pools.poolOfResults.BorrowResult()
s := ex.SpecValidator
if items != nil {