This key defines which string case types are allowed when parsing snippet parameters.
The value is an object that can contain any, leading_upper, leading_lower, lower, or upper properties. Each property is a boolean that enables or disables that case type.
Appears in
└── Snippet Format
└── allowed_string_casesType
Object
Properties
This key toggles whether CloudCannon will allow any string case type when parsing snippet parameters.
Setting this key to true will allow any case type (uppercase, lowercase, mixed case) in snippet parameter parsing.
By default, this key is false (i.e., case restrictions apply based on other allowed_string_cases settings).
Appears in: Snippet Format allowed_string_cases.
Show examplesHide examples
In this example, we have configured snippet format to allow any string case type.
_snippets:
example:
snippet: <<example [[param]]>>
params:
param:
parser: argument
options:
format:
allowed_string_cases:
any: true{
"_snippets": {
"example": {
"snippet": "<<example [[param]]>>",
"params": {
"param": {
"parser": "argument",
"options": {
"format": {
"allowed_string_cases": {
"any": true
}
}
}
}
}
}
}
}This key toggles whether CloudCannon will allow strings starting with a lowercase letter when parsing snippet parameters.
Setting this key to true will allow strings that begin with a lowercase letter in snippet parameter parsing.
By default, this key is false (i.e., strings starting with lowercase are not allowed unless any is enabled).
Appears in: Snippet Format allowed_string_cases.
Show examplesHide examples
In this example, we have configured snippet format to allow strings starting with a lowercase letter.
_snippets:
example:
snippet: <<example [[param]]>>
params:
param:
parser: argument
options:
format:
allowed_string_cases:
leading_lower: true{
"_snippets": {
"example": {
"snippet": "<<example [[param]]>>",
"params": {
"param": {
"parser": "argument",
"options": {
"format": {
"allowed_string_cases": {
"leading_lower": true
}
}
}
}
}
}
}
}This key toggles whether CloudCannon will allow strings starting with an uppercase letter when parsing snippet parameters.
Setting this key to true will allow strings that begin with an uppercase letter in snippet parameter parsing.
By default, this key is false (i.e., strings starting with uppercase are not allowed unless any is enabled).
Appears in: Snippet Format allowed_string_cases.
Show examplesHide examples
In this example, we have configured snippet format to allow strings starting with an uppercase letter.
_snippets:
example:
snippet: <<example [[param]]>>
params:
param:
parser: argument
options:
format:
allowed_string_cases:
leading_upper: true{
"_snippets": {
"example": {
"snippet": "<<example [[param]]>>",
"params": {
"param": {
"parser": "argument",
"options": {
"format": {
"allowed_string_cases": {
"leading_upper": true
}
}
}
}
}
}
}
}This key toggles whether CloudCannon will allow only lowercase strings when parsing snippet parameters.
Setting this key to true will require all characters to be lowercase in snippet parameter parsing.
By default, this key is false (i.e., lowercase-only strings are not required unless any is enabled).
Appears in: Snippet Format allowed_string_cases.
Show examplesHide examples
In this example, we have configured snippet format to allow only lowercase strings.
_snippets:
example:
snippet: <<example [[param]]>>
params:
param:
parser: argument
options:
format:
allowed_string_cases:
lower: true{
"_snippets": {
"example": {
"snippet": "<<example [[param]]>>",
"params": {
"param": {
"parser": "argument",
"options": {
"format": {
"allowed_string_cases": {
"lower": true
}
}
}
}
}
}
}
}This key toggles whether CloudCannon will allow only uppercase strings when parsing snippet parameters.
Setting this key to true will require all characters to be uppercase in snippet parameter parsing.
By default, this key is false (i.e., uppercase-only strings are not required unless any is enabled).
Appears in: Snippet Format allowed_string_cases.
Show examplesHide examples
In this example, we have configured snippet format to allow only uppercase strings.
_snippets:
example:
snippet: <<example [[param]]>>
params:
param:
parser: argument
options:
format:
allowed_string_cases:
upper: true{
"_snippets": {
"example": {
"snippet": "<<example [[param]]>>",
"params": {
"param": {
"parser": "argument",
"options": {
"format": {
"allowed_string_cases": {
"upper": true
}
}
}
}
}
}
}
}Examples
In this example, we have configured snippet format to allow only lowercase strings.
_snippets:
example:
snippet: <<example [[param]]>>
params:
param:
parser: argument
options:
format:
allowed_string_cases:
lower: true{
"_snippets": {
"example": {
"snippet": "<<example [[param]]>>",
"params": {
"param": {
"parser": "argument",
"options": {
"format": {
"allowed_string_cases": {
"lower": true
}
}
}
}
}
}
}
}