The new Validator associated type and FleeceValidator superclass constraint on the Fleece class allow extensions to validation beyond lifting Haskell functions.
I added a class called OpenApi3Validator to the json-fleece-openapi3 package that captures most of the OpenAPI 3 validations. Fleece instances can implement the OpenApi3Validator class on their associated Validator type to gain access to static information associated with the validations.
The intent is that downstream users will leverage the additional information to generate richer OpenAPI schemas based on their Fleece schemas.
There is a new constraint called FleeceOpenApi3 that includes the OpenApi3Validator constraint on the Fleece instance's Validator. It is exported by the json-fleece-openapi3 package, along with associated schemas that use the constraint.
The schemas serve as a drop-in replacement for those in Fleece.Core.Schemas. They use the methods on OpenApi3Validator to implement their validations.
I didn't add support for the pattern validation because I don't have good sense of what regex library to use.
The new
Validator
associated type andFleeceValidator
superclass constraint on theFleece
class allow extensions to validation beyond lifting Haskell functions.I added a class called
OpenApi3Validator
to thejson-fleece-openapi3
package that captures most of the OpenAPI 3 validations.Fleece
instances can implement theOpenApi3Validator
class on their associatedValidator
type to gain access to static information associated with the validations.The intent is that downstream users will leverage the additional information to generate richer OpenAPI schemas based on their Fleece schemas.
There is a new constraint called
FleeceOpenApi3
that includes theOpenApi3Validator
constraint on theFleece
instance'sValidator
. It is exported by thejson-fleece-openapi3
package, along with associated schemas that use the constraint.The schemas serve as a drop-in replacement for those in
Fleece.Core.Schemas
. They use the methods onOpenApi3Validator
to implement their validations.I didn't add support for the
pattern
validation because I don't have good sense of what regex library to use.