Background
While reviewing PR #45 a discrepancy surfaced: several docs/user-guide/*.md tables claim --output defaults to yaml when the code actually defaults to json (for create/update) or table (for get). PR #45 corrects this for docs/user-guide/global-rule.md only.
The actual, intended defaults across the CLI are consistent:
| Command type |
Default when --output is unset |
list |
table |
get |
table (FIELD/VALUE view) |
create / update |
json |
export / config dump |
yaml |
Across the codebase, 35 paths default to json and 8 (all export/dump) default to yaml. Tables are emitted by pkg/tableprinter when Output == "" in list/get.
Files needing audit / fix
Initial sweep — wrong --output defaults documented as yaml:
docs/user-guide/consumer.md — get, create, update, credential rows
docs/user-guide/credential.md — at least one wrong default
docs/user-guide/route.md — get, update rows
docs/user-guide/ssl.md — get, update rows
docs/user-guide/proto.md — get, update rows
docs/user-guide/secret.md — get, update rows
docs/user-guide/plugin-metadata.md — get, create, update rows
docs/user-guide/gateway-group.md — get row
docs/user-guide/debug.md — verify defaults
docs/user-guide/bulk-operations.md — verify
docs/user-guide/declarative-config.md — verify
A full grep over docs/user-guide/ and the corresponding pkg/cmd/<resource>/<action>/*.go source is needed to be exhaustive.
Acceptance criteria
- Every
--output row in docs/user-guide/*.md matches the actual default in the source file's if format == "" block (or the tableprinter-vs-exporter switch for list/get).
- Where the command supports a
table output, the format list includes table.
Out of scope
- Changing the actual code defaults — they are deliberate (humans get tables, machines get JSON, bulk files get YAML).
- Doc style or layout changes beyond fixing the
Default column and format list.
Related: #37, PR #45
Background
While reviewing PR #45 a discrepancy surfaced: several
docs/user-guide/*.mdtables claim--outputdefaults toyamlwhen the code actually defaults tojson(forcreate/update) ortable(forget). PR #45 corrects this fordocs/user-guide/global-rule.mdonly.The actual, intended defaults across the CLI are consistent:
--outputis unsetlisttablegettable(FIELD/VALUE view)create/updatejsonexport/config dumpyamlAcross the codebase, 35 paths default to
jsonand 8 (allexport/dump) default toyaml. Tables are emitted bypkg/tableprinterwhenOutput == ""inlist/get.Files needing audit / fix
Initial sweep — wrong
--outputdefaults documented asyaml:docs/user-guide/consumer.md— get, create, update, credential rowsdocs/user-guide/credential.md— at least one wrong defaultdocs/user-guide/route.md— get, update rowsdocs/user-guide/ssl.md— get, update rowsdocs/user-guide/proto.md— get, update rowsdocs/user-guide/secret.md— get, update rowsdocs/user-guide/plugin-metadata.md— get, create, update rowsdocs/user-guide/gateway-group.md— get rowdocs/user-guide/debug.md— verify defaultsdocs/user-guide/bulk-operations.md— verifydocs/user-guide/declarative-config.md— verifyA full grep over
docs/user-guide/and the correspondingpkg/cmd/<resource>/<action>/*.gosource is needed to be exhaustive.Acceptance criteria
--outputrow indocs/user-guide/*.mdmatches the actual default in the source file'sif format == ""block (or thetableprinter-vs-exporter switch forlist/get).tableoutput, the format list includestable.Out of scope
Defaultcolumn and format list.Related: #37, PR #45