Methods
- options
- Type:
Object
- limit
- Type:
Integer
- offset
- Type:
Integer
- count
- Type:
Integer
- ajv
- Type:
Ajv
validator instance
- val
- Type:
Object
orArray
value
- validator
- Type:
Ajv
- _root optional
- Type:
Object
orArray
initial value
Utils.getPaginationMeta(options)
Object
static
Parameters:
Object
Example:
require('serviser').utils.getPaginationMeta(options)
//Although you probably want to use res.setPaginationHeaders(options) method
// which sets all response headers needed for pagination
Utils.registerCustomKeywords(ajv)
Ajv
static
adds $desc
& $toJSON
schema keywords to Ajv validator
Parameters:
Ajv
Example:
require('serviser').utils.registerCustomKeywords(ajv)
Utils.resolveSchemaRefs(val, validator, _root)
Object
static
dereferences releative $refs and internal references to other ajv validator schemas
Parameters:
Object