tpagectl: site list YAML output keys diverge from JSON #552

Closed
opened 2026-08-05 09:53:05 +00:00 by the.auditor · 0 comments
Owner

listResponse/listDeployment in internal/tpagectl/site/list.go carry only json: tags. yaml.v3 lowercases Go field names by default, so --format yaml emits keys that diverge from the JSON/API keys:

  • repo_urlrepourl
  • custom_domaincustomdomain
  • current_deploymentcurrentdeployment
  • preview_enabledpreviewenabled
  • created_atcreatedat

TestListYAML doesn't catch this because it only checks single-word keys (name, status, url). Suggested fix: add yaml:"..." tags mirroring the JSON tags.

Ref: PR #551

`listResponse`/`listDeployment` in `internal/tpagectl/site/list.go` carry only `json:` tags. yaml.v3 lowercases Go field names by default, so `--format yaml` emits keys that diverge from the JSON/API keys: - `repo_url` → `repourl` - `custom_domain` → `customdomain` - `current_deployment` → `currentdeployment` - `preview_enabled` → `previewenabled` - `created_at` → `createdat` `TestListYAML` doesn't catch this because it only checks single-word keys (`name`, `status`, `url`). Suggested fix: add `yaml:"..."` tags mirroring the JSON tags. Ref: PR #551
fuzzy closed this issue 2026-08-05 11:08:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/thwap-pagesd#552
No description provided.