serene-conformation
Validation middleware for Serene, using Conformation.
Example
;;;; let service = ; let resources = widgets: schema: Schemaobject ; // this package depends on SereneResources, which must be registered firstserene; serene; serene;
The middleware only validates requests with a body, that is:
- create
- update
- replace
It wraps the schema
found in the resource definition with a attributes
field, so that it
conforms to the SuperAPI spec, and automatically unwraps
the request payload from the attributes
field.
See tests for more details.