Parameter Formatters for REST Connector Services
CloudStreams provides a parameter formatter which enables you to format input data into a custom format as desired.
Alternatively, in cases where the default parameter formatter is not sufficient to achieve the desired parameter behavior, you can write a custom implementation for the parameter formatter.
The input will typically be data present in a complex structure, for example, an IS document type.
The output will be data organized in a desired output format, for example, a URL query string. The format in which the output data is generated depends on the implementation of the formatter.
Typically, you will use the QUERYSTRING_PARAM or the FORM_ENCODED_PARAM parameter types to format the input data into a desired output format, for example, a URL query string in case of QUERYSTRING_PARAM or in case of FORM_ENCODED_PARAM, a formatted query string in the Request body.
In order to form the query string, you can write a custom formatter service by implementing the bundled IS specification wm.cloudstreams.service.common.lookup.specs:formatterSpec.
At run time CloudStreams will give control to the formatter service to format the data appropriately and to return the formatted string data. Then, CloudStreams will encode the data during a post-processing step, and the final query string will be formed.
For details, see: