fix: resolved comments

This commit is contained in:
mayur.popli
2025-04-04 16:34:43 +05:30
parent 67808f3628
commit bb737505d4
4 changed files with 5 additions and 8 deletions

View File

@@ -105,16 +105,13 @@ func (v *schemaValidator) Validate(ctx context.Context, url *url.URL, data []byt
// Return the array of schema validation errors
return &model.SchemaValidationErr{Errors: schemaErrors}
}
return model.NewBadReqErr(fmt.Errorf("validation failed: %v", err))
return fmt.Errorf("validation failed: %v", err)
}
// Return nil if validation succeeds
return nil
}
// ValidatorProvider provides instances of Validator.
type ValidatorProvider struct{}
// Initialise initialises the validator provider by compiling all the JSON schema files
// from the specified directory and storing them in a cache indexed by their schema filenames.
func (v *schemaValidator) initialise() error {