Merged upstreamCorrectnessMerged Sep 21, 2026
Honor plain output for API catalog listings
Added a five-column plain-text API catalog format with control-character normalization while preserving the default and JSON catalog responses.
openclaw/gogcli · #1146
CLI contract fix
`gog api list --plain` now emits stable tab-separated records instead of returning the same JSON payload as `--json`.
Problem
The command ignored plain-output mode and emitted JSON, breaking scripts that rely on the CLI's documented parseable TSV convention.
Approach
Emits NAME, VERSION, TITLE, DESCRIPTION, and PREFERRED fields in plain mode, normalizing embedded tabs and newlines without changing the full discovery document returned by default or JSON modes.
Impact and scope
- Restores a predictable shell-friendly output contract for API discovery and automation.
- Prevents catalog descriptions from corrupting row and field boundaries in TSV consumers.
- Leaves JSON fidelity and the existing Drive output behavior unchanged.
Validation
- The regression failed on the previous output path and passed after the fix; API-list and Drive escaping tests plus the repository CI target passed.
- A built CLI fetched Google's public Discovery catalog and produced 314 five-field TSV records while JSON retained all 314 APIs and its discovery metadata.
- All seven hosted checks passed, the linked issue is closed, and the verified merge commit credits Goutam Adwant.