mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
feat: support list(string) as coder_parameter (#6618)
* feat: support list(string) as coder_parameter * Fix
This commit is contained in:
@ -113,5 +113,6 @@ func validationEnabled(param TemplateVersionParameter) bool {
|
||||
return len(param.ValidationRegex) > 0 ||
|
||||
(param.ValidationMin != 0 && param.ValidationMax != 0) ||
|
||||
len(param.ValidationMonotonic) > 0 ||
|
||||
param.Type == "bool" // boolean type doesn't have any custom validation rules, but the value must be checked (true/false).
|
||||
param.Type == "bool" || // boolean type doesn't have any custom validation rules, but the value must be checked (true/false).
|
||||
param.Type == "list(string)" // list(string) type doesn't have special validation, but we need to check if this is a correct list.
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ type TemplateVersionParameter struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
DescriptionPlaintext string `json:"description_plaintext"`
|
||||
Type string `json:"type" enums:"string,number,bool"`
|
||||
Type string `json:"type" enums:"string,number,bool,list(string)"`
|
||||
Mutable bool `json:"mutable"`
|
||||
DefaultValue string `json:"default_value"`
|
||||
Icon string `json:"icon"`
|
||||
|
Reference in New Issue
Block a user