Page Contents

Home > @loopback/rest > RequestBodyValidationOptions

RequestBodyValidationOptions interface

Options for request body validation using AJV

Signature:

export interface RequestBodyValidationOptions extends ajv.Options 

Properties

Property Type Description
ajvErrorTransformer (errors: ajv.ErrorObject[]) => ajv.ErrorObject[] A function that transform the ErrorObjects reported by AJV. This could be used for error messages customization, localization, etc.
ajvKeywords true | string[] Enable additional AJV keywords from https://github.com/epoberezkin/ajv-keywords - true: Add all keywords from ajv-keywords - string[]: Add an array of keywords from ajv-keywords
compiledSchemaCache SchemaValidatorCache Custom cache for compiled schemas by AJV. This setting makes it possible to skip the default cache.