Module helpers

Source

Modules§

handlebars_ext
string_ext

Structs§

CamelcaseHelper
Returns the camel case version of the string
ClearHelper
Clear a value in the key/value store
DebugCtxHelper
Does not render anything but outputs the internal handlebars contexts to the commad line
DebugHelper
A debug helper that output a json representation of input parameters
DistinctiveHelper
Execute template if the first argument is equal to any other argument, otherwise execute the inverse (all arguments are converted to string and case insensitive compared)
GetHelper
Gets a value from the key/value store
GlobalParameterHelper
Gets a value from the global parameters (those key=value’s would be provided as parameters of codegenr execution)
Hex
IfArrayContainsHelper
Write the template if the second argument is found in the array passed as first argument (values are compared with string insensitive comparison) (Pas completement fonctionnelle)
IfEmptyHelper
Call the template if an empty or whitespaces string is passed as parameter
IfEqualsHelper
Execute template if the first argument is equal to any other argument, otherwise execute the inverse (all arguments are converted to string and case insensitive compared)
IfGetHelper
Sets a value in the key/value store and clear it at the end of the block
IfNotEmptyHelper
Call the template if a non empty or whitespaces string is passed as parameter, or any other non null value
IfNotEqualsHelper
Execute template if the first argument is not equal to all other arguments, otherwise execute the inverse (all arguments are converted to string and case insensitive compared)
IsOApi3ParamRequiredHelper
Returns true is the current context is an open api 3 required parameter.
IsOApi3PropRequiredHelper
Returns true is the current context is an open api 3 required component property, false otherwise
JsonHelper
Get the json representation of the first argument passed. If a second argument is true, the json is beautyfied
LowercaseFirstLetterHelper
Returns a string with the first letter in Lowercase
LowercaseHelper
Returns the lowercase version of the string in argument
NoEmptyLinesHelper
Removes empty lines from the block
OneLineHelper
Trim end of a block output (all arguments are converted to string and case insensitive compared)
PascalcaseHelper
Returns the pascal case version of the string
RegexExtractHelper
Extract and transform a list of values with regex.
RegexTransformHelper
Extract and transform a list of values.
SetHelper
Sets a value in the key/value store see GetHelper for more examples
SnakecaseHelper
Returns the snake case version of the string
SplitGetFirstHelper
Return the first part of a String splited by a definable parameter (‘/’ by default)
SplitGetLastHelper
Return the last value of a String splited by a definable parameter (‘/’ by default)
StartWithHelper
Determines whether the beginning of the second argumentmatches the second one
TrimBlockEndHelper
Trim end of a block output (all arguments are converted to string and case insensitive compared)
TrimBlockHelper
Trim start and end of a block output (all arguments are converted to string and case insensitive compared)
TrimBlockStartHelper
Trim start of a block output (all arguments are converted to string and case insensitive compared)
TrimEndHelper
Return a string trim only at the end by a definable parameter (’ ’ by default)
TrimHelper
Returns a string slice with leading and trailing whitespace removed.
TrimStartHelper
Return a string trim only at the beggining by a definable parameter (’ ’ by default)
UppercaseFirstLetterHelper
Returns a string with the first letter in Uppercase
UppercaseHelper
Returns the uppercase version of the string in argument
WithMatchingHelper
Execute the inner template with the matching parameter, when matching key is equal to the first parameter {{#with_matching some_value matching_key1 context1 mateching_key2 context2 … }} Render the inverse template if no matching key was found
WithSetHelper
Sets a value in the key/value store and clear it at the end of the block

Enums§

HelpersError

Constants§

CAMEL_CASE_HELPER
CLEAR_HELPER
DEBUG
DEBUG_CTX
DISTINCTIVE
EACH_WITH_SORT_HELPER
GET_HELPER
GLOBAL_PARAMETERS_HELPER
HEX
IF_ARRAY_CONTAINS
IF_EMPTY_HELPER
IF_EQUALS_HELPER
IF_NOT_EMPTY_HELPER
IF_NOT_EQUALS_HELPER
IF_SET_HELPER
IS_OAPI3_PARAM_REQUIRED
IS_OAPI3_PROP_REQUIRED
JSON_HELPER
LOWERCASE_FIRST_LETTER_HELPER
LOWERCASE_HELPER
NO_EMPTY_LINES_HELPER
ONE_LINE_HELPER
PASCAL_CASE_HELPER
REGEX_EXTRACT_HELPER
REGEX_TRANSFORM_HELPER
SET_HELPER
SNAKE_CASE_HELPER
SPLIT_GET_FIRST_HELPER
SPLIT_GET_LAST_HELPER
START_WITH_HELPER
TRIM_BLOCK_END_HELPER
TRIM_BLOCK_HELPER
TRIM_BLOCK_START_HELPER
TRIM_END_HELPER
TRIM_HELPER
TRIM_START_HELPER
UPPERCASE_FIRST_LETTER_HELPER
UPPERCASE_HELPER
WITH_MATCHING_HELPER
WITH_SET_HELPER

Functions§

exec_template
exec_template_with_global_params
handlebars_setup
hex
Return the hexadecimal representation of the integer value