cli
cli copied to clipboard
[FEATURE REQUEST] Secret Store list command to produce empty array instead of null for json output
When requesting to list edge resources in json, the secret store produces a null output when empty.
vcarvajal@vcarvajal-fastly:$ fastly secret-store list --quiet --json
null
I'm using the following version:
vcarvajal@vcarvajal-fastly:$ fastly version
Fastly CLI version v10.18.0 (9679de4f)
Built with go version go1.22.11 linux/amd64 (2025-02-07)
Viceroy version: viceroy 0.12.2
Additionally, the output from various other edge resources types will produce an empty array.
vcarvajal@vcarvajal-fastly:$ fastly object-store list --quiet --json
{
"Data": [],
"Meta": {
"limit": "1000",
"total": "0"
}
}
vcarvajal@vcarvajal-fastly:$ fastly kv-store list --quiet --json
{
"Data": [],
"Meta": {
"limit": "1000",
"total": "0"
}
}
vcarvajal@vcarvajal-fastly:$ fastly config-store list --quiet --json
[]
Describe the solution you'd like
It would be great to have them produce an empty array rather than null.
vcarvajal@vcarvajal-fastly:$ fastly secret-store list --quiet --json
[]
Agreed, the lack of consistency here is harmful. In fact the 'kv-store list' command is literally just emitting the raw JSON response from the API endpoint...