Skip to content

docs(user-guide): audit and fix incorrect --output defaults across all resources #49

@shreemaan-abhishek

Description

@shreemaan-abhishek

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions