Utility to make building sync functions for Sync Gateway easier

Development on synctos keeps on chugging along at a healthy rate. Today sees the release of version 1.7.0, which adds a few notable conveniences:

  • When a document specifies the simple type filter (simpleTypeFilter), it is no longer necessary to explicitly include a type property in that document’s list of property validators. Now, in such cases, the type property will be implicitly allowed and will use the typeIdValidator that was introduced in the last release.
  • An enum property validation type has been added that allows you to limit the values that may be assigned to a property/element by specifying an accompanying list of predefined values. Predefined values may be either strings or integers.
  • The hashtable property validation type can now enforce minimum and maximum size limits on hashtable/object property values. In other words, you can fully control how many elements/key-value pairs a hashtable property can hold.

Also, behind the scenes the sync function template file has been decomposed into three main components/modules: authorization, validation and access assignment. This is not a breaking change; existing document definitions will continue to work as before. But the change will make it easier to maintain the project (i.e. add and update features) in the future.

Take a look at the project’s change log and README for all the details and examples.