Releases: pb33f/libopenapi-validator
v0.9.2
Added a new XMLValidator interface and the ability validate (in a simple mechanism) XML is valid.
// XMLValidator is an interface that defines methods for validating XML against OpenAPI schemas.
// There are 2 methods for validating XML:
//
// ValidateXMLString validates an XML string against a schema, applying OpenAPI xml object transformations.
// ValidateXMLStringWithVersion - version-aware XML validation that allows OpenAPI 3.0 keywords when version is specified.
type XMLValidator interface {
// ValidateXMLString validates an XML string against an OpenAPI schema, applying xml object transformations.
// Uses OpenAPI 3.1+ validation by default (strict JSON Schema compliance).
ValidateXMLString(schema *base.Schema, xmlString string) (bool, []*liberrors.ValidationError)
// ValidateXMLStringWithVersion validates an XML string with version-specific rules.
// When version is 3.0, OpenAPI 3.0-specific keywords like 'nullable' are allowed and processed.
// When version is 3.1+, OpenAPI 3.0-specific keywords like 'nullable' will cause validation to fail.
ValidateXMLStringWithVersion(schema *base.Schema, xmlString string, version float32) (bool, []*liberrors.ValidationError)
}v0.9.1
Fixes daveshanley/vacuum#726
v0.9.0
Introduces a regex cache to the FindPath method.
It's a breaking change, but well worth it if you're using this library in long running, heavy load servers and you're seeing memory drain.
v0.8.1
Fixes cache warm up bug
v0.8.0
Adds in Schema caching for long running validation.
A full breakdown of the changes.
v0.7.0
Support for considering the OpenAPI version in response.ValidateResponseSchema and request.ValidateRequestSchema.
Each function signature contains a breaking change.
In ValidateRequestSchema and ValidateResponseSchema, I think the version should ideally be passed as a parameter via config.Option, but since all other functions were passing the version as an argument, I followed suit.
(For example, the intent of the arguments of helpers.NewCompiledSchemaWithVersion becomes unclear.)
v0.6.4
Upgrades to latest libopenapi
v0.6.3
Fixed validation for schemas that have no index.
v0.6.2
Addressing daveshanley/vacuum#712
v0.6.1
Relaxes ignore regex on noise from schema violations.