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.
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 #
final result = await kuzzle
.collection
.updateSpecifications('nyc-open-data', 'yellow-taxi', {
'fields': {
'license': {
'type': 'string',
'mandatory': true,
},
},
'strict': false,
});
Edit this page on Github(opens new window)