ArtefactTemplate

This page details the format for the JSON artefact template definition file.

ArtefactTemplate

Property Name Data Type Remarks
TemplateCode String The code that uniquely identifies this template within the template source
TemplateName String The name of the template, for identification in the UI
TemplateDescription String A description of the template's usage/purpose
TemplateCategoryCode String The code of the template category into which to place the template
TemplatePath String The path and filename of the template text file within the template source
ArtefactTypeCode String The code specifying the type of artefact the template creates
RequiresDataStructure Boolean Whether a data structure must be selected when creating an artefact with this template
PrimaryLanguageCode String A code that represents the language being generated, used to determine naming conventions
ArtefactNameTemplate String A naming template that is used to calculate the default name when adding a new artefact
ArtefactSummaryTemplate String A template that is used to calculate the default summary when adding a new artefact
OutputNameTemplate String A template that is used to calculate the default output name when adding a new artefact
OutputEncodingCode String A code that represents the encoding for the output from code generation
Sequence string The sequence of this artefact template in its parent category when shown in a list
Properties Array of ArtefactTemplateProperty The custom properties available for editing on an artefact created from this template
Helpers Array of ArtefactTemplateHelper The helpers to be exposed during generation of an artefact created from this template

Valid values for ArtefactTypeCode are:

Code Meaning
SOLUTION A solution - the top-level of the artefact type hierarchy. Solutions can contain artefacts of any other type
PROJECT A project. Projects can contain folders and items
FOLDER A folder. Folders can contain other folders and items
ITEM An item. This is the bottom of the artefact type hierarchy and cannot contain anything else

Valid values for PrimaryLanguageCode are defined by what languages you set up. However, common ones include:

Code Meaning
CSHARP C#
MSSQL Microsoft's T-SQL
HTML Hypertext Markup Language
JAVASCRIPT JavaScript
TEXT Other, unspecified text

Valid values for OutputEncodingCode are:

Code Meaning
UTF7 UTF-7
UTF8BOM UTF-8 with a byte order mark
UTF8 UTF-8 (no byte order mark)
UTF16LittleEndianBOM Little-endian UTF-16 with a byte order mark
UTF16LittleEndian Little-endian UTF-16 (no byte order mark)
UTF16BigEndianBOM Big-endian UTF-16 with a byte order mark
UTF16BigEndian Big-endian UTF-16 (no byte order mark)
UTF32LittleEndianBOM Little-endian UTF-32 with a byte order mark
UTF32LittleEndian Little-endian UTF-32 (no byte order mark)
UTF32BigEndianBOM Big-endian UTF-32 with a byte order mark
UTF32BigEndian Big-endian UTF-32 (no byte order mark)

ArtefactTemplateProperty

Property Name Data Type Remarks
PropertyName String The name by which this property can be accessed in code generation templates
PropertyFriendlyName String The user-friendly name by which this property is known in the DesiGen UI
PropertyDescription String The description of this property, for display to a user in the DesiGen UI
DefaultValueTemplate String The template used to calculate the default value for this property when adding a new artefact

ArtefactTemplateHelper

Property Name Data Type Remarks
CodeGenTemplateSourceCode String The code for the template source in which the helper type is defined; empty string for this template source
ArtefactTemplateHelperTypeCode String The code by which the helper is known in the template source

It is a current limitation of DesiGen that only built-in helpers can be used. Therefore, the only valid value for CodeGenTemplateSourceCode is currently "BUILTIN"

Details of the built-in helpers are in the Code Generation section.