Skip to content

Fix JSON field mapping and response types#39

Merged
omattsson merged 1 commit intomainfrom
fix/json-field-mapping
Apr 21, 2026
Merged

Fix JSON field mapping and response types#39
omattsson merged 1 commit intomainfrom
fix/json-field-mapping

Conversation

@omattsson
Copy link
Copy Markdown
Owner

Summary

  • Fix JSON struct tags to match backend API field names (is_published, owner_id, last_deployed_at, repository_url, pageSize)
  • Use ChartName instead of Name for chart display (backend has no name field)
  • Change deploy/stop/clean return type to DeployResponse (matches backend 202 response)
  • Change template instantiate to return StackDefinition (matches what the API creates)
  • Rename CHARTS column to DEFINITIONS in template list, update help text

Test plan

  • go test ./... -- all pass (unit, integration, e2e)
  • stackctl template list -- PUBLISHED and DEFINITIONS columns populated
  • stackctl template get -o json -- all fields present
  • stackctl template instantiate --name test -- shows definition details
  • stackctl stack deploy -- log ID shown correctly

Companion backend PR: omattsson/k8s-stack-manager#177

Fixes #38

Generated with Claude Code

Fix JSON tags to match backend field names (is_published, owner_id,
last_deployed_at, repository_url, pageSize), use ChartName for display,
change deploy/stop/clean to return DeployResponse, change instantiate
to return StackDefinition, rename CHARTS column to DEFINITIONS, update
instantiate help text, and fix all affected unit and integration tests.

Fixes #38

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@omattsson omattsson merged commit 229d2dd into main Apr 21, 2026
6 checks passed
@omattsson omattsson deleted the fix/json-field-mapping branch April 21, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI table/JSON output shows empty fields for templates, definitions, and logs

1 participant