From c4df3813a9d76c0eb6d1774e7adc6d873b27cc26 Mon Sep 17 00:00:00 2001 From: Arne de Laat Date: Tue, 1 Sep 2020 15:21:49 +0200 Subject: [PATCH] Allow configuring schema property for existing collections --- arango/collection.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arango/collection.py b/arango/collection.py index a1fcbc59..6b76eb4d 100644 --- a/arango/collection.py +++ b/arango/collection.py @@ -306,11 +306,13 @@ def response_handler(resp): return self._execute(request, response_handler) - def configure(self, sync=None): + def configure(self, sync=None, schema=None): """Configure collection properties. :param sync: Block until operations are synchronized to disk. :type sync: bool + :param schema: document schema for validation of objects. + :type schema: dict :return: New collection properties. :rtype: dict :raise arango.exceptions.CollectionConfigureError: If operation fails. @@ -318,6 +320,8 @@ def configure(self, sync=None): data = {} if sync is not None: data['waitForSync'] = sync + if schema is not None: + data['schema'] = schema request = Request( method='put',