docs(user-guide): fix incorrect --output defaults across resources#51
Merged
Conversation
The Default cell and format list for several `--output` rows didn't match the source: `get` defaults to `table` (FIELD/VALUE view), `create`/`update` default to `json`, and only `export`/`config dump` default to `yaml`. Fixed across consumer, credential, gateway-group, plugin-metadata, proto, route, secret, service, ssl and stream-route. Where create/update has no tableprinter path (route, service, ssl, stream-route, proto), `table` is also removed from the format list since the exporter would reject it. global-rule.md is left for PR #45 which already fixes that file. Refs #49.
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughUser-guide documentation for nine CLI resource commands was updated to correct the documented ChangesCLI documentation output format defaults
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…efaults # Conflicts: # docs/user-guide/credential.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #49.
Several
docs/user-guide/*.mdtables claimed--outputdefaults toyamlwhen the source code actually defaults tojson(create/update) ortable(get). This PR aligns theDefaultcolumn and format list with the actualif format == ""blocks inpkg/cmd/<resource>/<action>/*.go.Code defaults that the docs now reflect:
listtablegettable(FIELD/VALUE view)create/updatejsonexport/config dumpyamlFor
create/updatecommands that have no tableprinter path (route,service,ssl,stream-route,proto),tableis also removed from the format list sincecmdutil.NewExporterrejects it asunsupported output format: table.docs/user-guide/global-rule.mdis intentionally left alone — open PR #45 fixes those three rows.Files changed (10)
consumer.md,credential.md,gateway-group.md,plugin-metadata.md,proto.md,route.md,secret.md,service.md,ssl.md,stream-route.mdSkipped:
bulk-operations.md(planned/unimplemented),declarative-config.md(already correct),debug.md(already correct),plugin.md(already correct).Test plan
grep -n '\--output`' docs/user-guide/*.mdshows every row now matches the correspondingif format == ""block inpkg/cmd/`.getpaths (e.g.pkg/cmd/secret/get/get.go,pkg/cmd/gateway-group/get/get.go,pkg/cmd/proto/get/get.go) all fall through totableprinterwhenOutput == "".create/updatepaths forroute,service,ssl,stream-route,protoconfirm no tableprinter codepath, sotablewas wrongly listed.Summary by CodeRabbit
getcommands default totable, whilecreateandupdatecommands default tojson.