Overview
Decorators

Decorators

Zero has decorators that can be used to modify the behavior of functions.

The following decorators are available:

DecoratorDescription
@BodyUsed for validating request body, takes a List of Field as arguement
@ParamUsed to add params to the request, takes a List of String where the string value is the key of the request.params object
@PathThis decorator is compulsory for all routable methods, it takes a required String value as the path and an optional formal parameter method to specify the request method. Defaults to GET method