-
Notifications
You must be signed in to change notification settings - Fork 15
Deep Dive | Templates
The templates
property is an object containing configuration objects used to transform data into a specific format to prepare it for export. This is the top level schema with all possible properties:
{
"templates": {
"<template_name>": {
"name": "",
"template": "",
"templateFile": "",
"fileName": "",
"customData": {}
}
}
}
Notes
- Replace <request_name> with any name desired. This name is only used for reference purposes
(string) The human-friendly name of the object. This value is completely arbitrary.
(string) The template is used to generate output using API data after transforms have been applied. The result of the template is exported to a file with the given fileName based on the configured exports. For more information on templating, see Deep Dive | Templating.
(string) Instead of providing a template inline using the template
property, a path to a file can be provided that contains the contents of the template. The path can be an absolute or relative path. If relative, it will be evaluated relative to the location of index.js, not the invocation path. This file's contents will be read at the time the template is processed. This property will only be used if template
is not specified.
(string) The fileName is used to determine the name of the file to use when exporting the result of the template. This property supports templating. For more information on templating, see Deep Dive | Templating.
(Object) An object of key/value pairs defining custom data to be made available to the request and template. Each key/value pair will be set to def.vars
as def.vars[key] = value
.