mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
fix!: omit name, avatar_url and last_seen_at from responses when empty (#18005)
User name, avatar URL, and last seen at, are not required fields so they can be empty. Instead of returning the 0 values from Go, we want to make it more agnostic, and omit them when they are empty. This make the docs and usage way clearer for consumers.
This commit is contained in:
@ -58,7 +58,7 @@ type WorkspaceBuild struct {
|
||||
WorkspaceName string `json:"workspace_name"`
|
||||
WorkspaceOwnerID uuid.UUID `json:"workspace_owner_id" format:"uuid"`
|
||||
WorkspaceOwnerName string `json:"workspace_owner_name"`
|
||||
WorkspaceOwnerAvatarURL string `json:"workspace_owner_avatar_url"`
|
||||
WorkspaceOwnerAvatarURL string `json:"workspace_owner_avatar_url,omitempty"`
|
||||
TemplateVersionID uuid.UUID `json:"template_version_id" format:"uuid"`
|
||||
TemplateVersionName string `json:"template_version_name"`
|
||||
BuildNumber int32 `json:"build_number"`
|
||||
|
Reference in New Issue
Block a user