You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user wants to clear the field content (e.g. description) using the Template Settings form, and submit description: "", it isn't possible as the API considers it as "no change". On the other hand, a user can set the icon field, but calling the CLI: coder templates edit <template-name> will simply remove the icon.
The suggested solution would be to distinguish these actions:
delete the field: field "" is present in the JSON request
leave as is: field is not present in the request
modify the field: non-empty field is present in the request
It implicates that CreateTemplateRequest and UpdateTemplateMeta should either contain nillable fields or we need to redesign that contract (API can receive a set of modify-actions).