Kuzzle natively provides a way to validate the documents you want to create, replace, update or publish against a validation specification. You can specify the validation rules in the kuzzle configuration file in
A specification is always attached to the collection of an index.
The API offers several actions to perform on specifications, allowing to get, update, delete or validate them. You can refer to the API documentation for more information.
A specification is composed of three properties:
fieldsproperty: this property is intended to describe the document's fields. It includes the definition of their type, boundaries, if they're required or not etc. depending on the type of the field.
validatorsproperty: this property is intended to match the document using DSL filters. It allows to build conditionnal filters, acceptance criterias, etc.
strictproperty: this property specifies if the field specification is strict. If it is, the addition of unknown fields (i.e. not defined in the
fieldsproperty) is forbidden and will be rejected.