feat: mark coder_parameter as "required" (#6433)

* Add required column

* Pass through providerd

* Pass the required property down

* Optional

* Fix

* Fix

* Fix

* fix

* CLI create: support for optional fields

* Use HTML API to mark fields required

* Fix

* Improve validation

* more fixes

* make fmt

* Fix

* WIP

* Fix: test

* CLI update tets

* OptionalParameterAdded

* Fix: migration
This commit is contained in:
Marcin Tojek
2023-03-07 16:38:31 +01:00
committed by GitHub
parent f19076cf06
commit 2d4706ac33
30 changed files with 651 additions and 409 deletions

View File

@ -4846,6 +4846,7 @@ Parameter represents a set value for the scope.
"value": "string"
}
],
"required": true,
"type": "string",
"validation_error": "string",
"validation_max": 0,
@ -4866,6 +4867,7 @@ Parameter represents a set value for the scope.
| `mutable` | boolean | false | | |
| `name` | string | false | | |
| `options` | array of [codersdk.TemplateVersionParameterOption](#codersdktemplateversionparameteroption) | false | | |
| `required` | boolean | false | | |
| `type` | string | false | | |
| `validation_error` | string | false | | |
| `validation_max` | integer | false | | |

View File

@ -2205,6 +2205,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
"value": "string"
}
],
"required": true,
"type": "string",
"validation_error": "string",
"validation_max": 0,
@ -2239,6 +2240,7 @@ Status Code **200**
| `»» icon` | string | false | | |
| `»» name` | string | false | | |
| `»» value` | string | false | | |
| `» required` | boolean | false | | |
| `» type` | string | false | | |
| `» validation_error` | string | false | | |
| `» validation_max` | integer | false | | |