ContentSettings
ContentSettings is an object that contains settings used to configure the output of a Transformer.
It can be obtained from a GenerateContext using eithercontext.toOperationContentSettings, context.toModelContentSettings or context.toGatewayContentSettings depending on what you are doing.
ContentSettings.empty
Create a new ContentSettings object using identifier and exportPath. selected will be true and importFrom will be set to exportPath.
ContentSettings.empty({ identifier, exportPath })
Parameters
| Property | Type | Description |
|---|---|---|
| identifier | Identifier | Identifier to use in Definition with generated code. |
| exportPath | string | Path to the file where Definition with generated code should be registered. |
Return value
A new ContentSettings object with default values.
Properties
| Property | Type | Description |
|---|---|---|
| isSelected | boolean | Denotes where content is selected for generation. |
| identifier | Identifier | Identifier to use in Definition with generated code. |
| exportPath | string | Path to the file where Definition with generated code should be registered. |
| importFrom | string | (Advanced) Path from which generated code should be imported from. Unless content is pinned, it will be same as exportPath. |