mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat!: Validate monotonic numbers for rich parameters (#6046)
* Database changes * protobuf * Fix: docs * workspaces_test * Validation in coderd * Fix: resources * omitempty * UI changes * UI tests * fix
This commit is contained in:
Generated
+76
-1
@@ -2320,7 +2320,7 @@
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/parameter.ComputedValue"
|
||||
"$ref": "#/definitions/codersdk.TemplateVersionParameter"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6781,6 +6781,73 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.TemplateVersionParameter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"default_value": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"mutable": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.TemplateVersionParameterOption"
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["string", "number", "bool"]
|
||||
},
|
||||
"validation_error": {
|
||||
"type": "string"
|
||||
},
|
||||
"validation_max": {
|
||||
"type": "integer"
|
||||
},
|
||||
"validation_min": {
|
||||
"type": "integer"
|
||||
},
|
||||
"validation_monotonic": {
|
||||
"enum": ["increasing", "decreasing"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ValidationMonotonicOrder"
|
||||
}
|
||||
]
|
||||
},
|
||||
"validation_regex": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.TemplateVersionParameterOption": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.TraceConfig": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -6984,6 +7051,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.ValidationMonotonicOrder": {
|
||||
"type": "string",
|
||||
"enum": ["increasing", "decreasing"],
|
||||
"x-enum-varnames": [
|
||||
"MonotonicOrderIncreasing",
|
||||
"MonotonicOrderDecreasing"
|
||||
]
|
||||
},
|
||||
"codersdk.Workspace": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user