SDK
SDK Dart v1.x
2

# updateSpecifications

The updateSpecifications method allows you to create or update the validation specifications for a collection.

When the validation specification is not formatted correctly, a detailed error message is returned to help you fix it.


Copied to clipboard!
Future<Map<String, dynamic>> updateSpecifications(
    String index,
    String collection,
    bool strict,
    Map<String, dynamic> specifications,
  )

Arguments Type Description
index
String
Index name
collection
String
Collection name
specifications
Map<String, dynamic>
Specifications to update

# specifications

A Map<String, dynamic> representing the specifications.

It must follow the Specification Structure.

# Returns

Returns a Map<String, dynamic> containing the specifications.

# Usage

Copied to clipboard!
final result = await kuzzle
  .collection
  .updateSpecifications('nyc-open-data', 'yellow-taxi', {
    'fields': {
      'license': {
        'type': 'string',
        'mandatory': true,
      },
    },
    'strict': false,
  });