-
Notifications
You must be signed in to change notification settings - Fork 1
Syntax
Use these tags to generate data.
Key: {{ Name }}
Description: The Name tag is replaced by the name of the object or property
Example:
Text: "qwerty_abcdef"
Template: {{ Name }}
Result: qwerty_abcdef
Key: {{ Name.CamelCase }}
Description: The Name.CamelCase tag is replaced by the name of the object or property in camelCase format
Example:
Text: "qwerty_abcdef"
Template: {{ Name.CamelCase }}
Result: qwertyAbcdef
Key: {{ Name.PascalCase }}
Description: The Name.PascalCase tag is replaced by the name of the object or property in PascalCase format
Example:
Text: "qwerty_abcdef"
Template: {{ Name.PascalCase }}
Result: QwertyAbcdef
Key: {{ Name.SnakeCase }}
Description: The Name.SnakeCase tag is replaced by the name of the object or property in snake_case format
Example:
Text: "qwertyAbcdef"
Template: {{ Name.SnakeCase }}
Result: qwerty_abcdef
Key: {{ Name.KebabCase }}
Description: The Name.KebabCase tag is replaced by the name of the object or property in kebab-case format
Example:
Text: "qwerty_abcdef"
Template: {{ Name.KebabCase }}
Result: qwerty-abcdef
Key: {{ Name.DotCase }}
Description: The Name.DotCase tag is replaced by the name of the object or property in dot.case format
Example:
Text: "qwerty_abcdef"
Template: {{ Name.DotCase }}
Result: qwerty.abcdef
Key: {{ Properties }}
Description: Tag no printer. The Properties tag start loop properties of object. The Name and Type tags act on the property inside the loop
Example:
JSON: {"qwerty_abcdef": 1}
Template: {{ Properties }}{{ Name }}{{ /Properties }}
Result: qwerty_abcdef
Key: {{ /Properties }}
Description: The /Properties tag end loop properties of object.
Example:
Key: {{ Type }}
Description: The Type tag is replaced by the type of the object or property. The type is formatted based on the specified programming language or custom mapping
Example:
JSON: {"qwerty_abcdef": 1}
Template: {{ Properties }}{{ Name }} {{ Type }}{{ /Properties }}
Result: qwerty_abcdef int
Key: {{ Type.Doc }}
Description: Tag no printer. The Type.Doc tag is replaced by the type of the object or property. The type is formatted based on the specified programming language or custom documentation type mapping
Example:
Lang: PHP
JSON: {"qwerty_abcdef": [1]}
Template: {{ Properties }}{{ Name }} {{ Type.Doc }}{{ /Properties }}
Result: qwerty_abcdef int[]
Key: {{ Type.IsArray }}
Description: The Type.IsArray begin tag is condition if type == "array"
Example:
JSON: {"qwerty_abcdef": [1]}
Template: {{ Properties }}{{ Type.IsArray }}{{ Name }}[]{{ /Type.IsArray }}{{ /Properties }}
Result: qwerty_abcdef[]
Key: {{ /Type.IsArray }}
Description: Close tag for {{ Type.IsArray }}
Example:
Key: {{ Type.IsObject }}
Description: The Type.IsObject begin tag is condition if type == "array"
Example:
JSON: {"qwerty_abcdef": {"a":true}}
Template: {{ Properties }}{{ Type.IsObject }}*{{ Name }}{{ /Type.IsObject }}{{ /Properties }}
Result: *qwerty_abcdef
Key: {{ /Type.IsObject }}
Description: Close tag for {{ Type.IsObject }}
Example:
Key: {{ SPLIT }}
Description: Tag no printer. This tag marks the location of the subtemplate.
If a subtemplate is specified, then the generator generates all child objects according to the subtemplate
Example:
JSON: {"rootObject":{"childObject":{"qwerty":true}}}
Template: header text {{SPLIT}}{{ Properties }}{{ Name.PascalCase }} {{ Type }}{{ /Properties }}; {{ /SPLIT}}
Result: header text RootObject RootObject; ChildObject ChildObject; Qwerty bool;
Key: {{ /SPLIT }}
Description: Close tag for {{ SPLIT }}
Example: