chore!: fix workspace apps response (#17700)

Fix WorkspaceApp response type to better reflect the schema from
https://registry.terraform.io/providers/coder/coder/latest/docs/resources/app.
This commit is contained in:
Bruno Quaresma
2025-05-07 10:05:07 -03:00
committed by GitHub
parent d146115ca0
commit 9fe5b71d31
9 changed files with 22 additions and 33 deletions

View File

@ -60,14 +60,14 @@ type WorkspaceApp struct {
ID uuid.UUID `json:"id" format:"uuid"`
// URL is the address being proxied to inside the workspace.
// If external is specified, this will be opened on the client.
URL string `json:"url"`
URL string `json:"url,omitempty"`
// External specifies whether the URL should be opened externally on
// the client or not.
External bool `json:"external"`
// Slug is a unique identifier within the agent.
Slug string `json:"slug"`
// DisplayName is a friendly name for the app.
DisplayName string `json:"display_name"`
DisplayName string `json:"display_name,omitempty"`
Command string `json:"command,omitempty"`
// Icon is a relative path or external URL that specifies
// an icon to be displayed in the dashboard.
@ -81,7 +81,7 @@ type WorkspaceApp struct {
SubdomainName string `json:"subdomain_name,omitempty"`
SharingLevel WorkspaceAppSharingLevel `json:"sharing_level" enums:"owner,authenticated,public"`
// Healthcheck specifies the configuration for checking app health.
Healthcheck Healthcheck `json:"healthcheck"`
Healthcheck Healthcheck `json:"healthcheck,omitempty"`
Health WorkspaceAppHealth `json:"health"`
Hidden bool `json:"hidden"`
OpenIn WorkspaceAppOpenIn `json:"open_in"`