Skip to content

fix(iaas): print valid JSON/YAML output for list cmds#1365

Open
j1n-o9r wants to merge 39 commits intostackitcloud:mainfrom
j1n-o9r:fix/STACKITCLI-241-iaas-json-list-output
Open

fix(iaas): print valid JSON/YAML output for list cmds#1365
j1n-o9r wants to merge 39 commits intostackitcloud:mainfrom
j1n-o9r:fix/STACKITCLI-241-iaas-json-list-output

Conversation

@j1n-o9r
Copy link
Copy Markdown
Contributor

@j1n-o9r j1n-o9r commented Apr 13, 2026

Description

relates to STACKITCLI-241 / #893

Addition: I encountered a missing --limit-flag within the stackit security-group list command and directly fixed this after consulting @marceljk

Testing Instructions

Test for every list command that is changed (like f.e. stackit server list) if the command returns the expected outputs like:

  • stackit server list -> Expected: No servers found for project "xxx"
  • stackit server list --output-format json -> Should output valid JSON
  • stackit server list --output-format yaml -> Should output valid YAML

Mock responses if testing against API is not possible.

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@j1n-o9r j1n-o9r marked this pull request as ready for review April 13, 2026 15:07
@j1n-o9r j1n-o9r requested a review from a team as a code owner April 13, 2026 15:07
@rubenhoenle
Copy link
Copy Markdown
Member

Missing:

... and maybe more. Please check carefully 😅

@j1n-o9r
Copy link
Copy Markdown
Contributor Author

j1n-o9r commented Apr 15, 2026

Missing:

... and maybe more. Please check carefully 😅

Sorry, I mistakenly understood the examples in the ticket as acceptance criteria and did not check the other resources. I will go through all and add the missing parts.😅

@j1n-o9r j1n-o9r marked this pull request as draft April 15, 2026 12:52
@rubenhoenle
Copy link
Copy Markdown
Member

@j1n-o9r We currently have a lot of merge conflicts here, could you please resolve them before one of the collegues starts with a review? 😅

@j1n-o9r j1n-o9r force-pushed the fix/STACKITCLI-241-iaas-json-list-output branch 2 times, most recently from fadd859 to eaa4afb Compare April 22, 2026 10:26
j1n-o9r added 22 commits April 22, 2026 12:28
… any items via outputResult function instead of returning nil bluntly. adapted tests therefore.
@j1n-o9r j1n-o9r force-pushed the fix/STACKITCLI-241-iaas-json-list-output branch from eaa4afb to 9b8c40d Compare April 22, 2026 10:35
@j1n-o9r j1n-o9r marked this pull request as ready for review April 22, 2026 11:46
Comment thread internal/cmd/affinity-groups/list/list.go
Comment thread internal/cmd/affinity-groups/list/list_test.go
Comment thread internal/cmd/key-pair/list/list.go Outdated
Comment thread internal/cmd/key-pair/list/list.go Outdated
Comment thread internal/cmd/key-pair/list/list_test.go Outdated
Comment thread internal/cmd/network-area/list/list.go Outdated
Comment thread internal/cmd/network-area/network-range/list/list.go Outdated
Comment thread internal/cmd/network-area/network-range/list/list.go Outdated
Comment thread internal/cmd/network-area/network-range/list/list.go Outdated
Comment thread internal/cmd/network-area/network-range/list/list.go Outdated
Comment thread internal/cmd/security-group/list/list.go
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.

2 participants