- Description:
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, orupperproperties. Each property is a boolean that enables or disables that case type.- Appears in:
└── Snippet Format └── allowed_string_cases- Type:
Object- Properties:
This key toggles whether CloudCannon will allow any string case type when parsing snippet parameters.
Setting this key to
truewill 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 otherallowed_string_casessettings).Show examplesHide examples
In this example, we have configured snippet format to allow any string case type.
Copied to clipboard_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
truewill 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 unlessanyis enabled).Show examplesHide examples
In this example, we have configured snippet format to allow strings starting with a lowercase letter.
Copied to clipboard_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
truewill 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 unlessanyis enabled).Show examplesHide examples
In this example, we have configured snippet format to allow strings starting with an uppercase letter.
Copied to clipboard_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
truewill require all characters to be lowercase in snippet parameter parsing.By default, this key is
false(i.e., lowercase-only strings are not required unlessanyis enabled).Show examplesHide examples
In this example, we have configured snippet format to allow only lowercase strings.
Copied to clipboard_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
truewill require all characters to be uppercase in snippet parameter parsing.By default, this key is
false(i.e., uppercase-only strings are not required unlessanyis enabled).Show examplesHide examples
In this example, we have configured snippet format to allow only uppercase strings.
Copied to clipboard_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.
Copied to clipboard_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 } } } } } } } }