feat(api-explorer): add command hyperlinks for large output [DEVEX-967] - #187
Conversation
Replaces unbounded/truncated-in-place output in the API explorer with a
navigable command surface: `api describe`/`api endpoint` become
`api operation get`/`api operation list`, and new `api parameter`,
`api response`, and `api schema` command groups let a caller drill into
an operation's parameters, responses, and schemas individually instead
of everything being inlined.
- Every parameter/response row carries a `type` and, when there's a
schema worth drilling into (a `$ref` or an object with properties), a
`schemaId` — resolvable via the new `api schema get <id>`.
- Truncated previews (`operation get`'s embedded parameter/response
tables, standalone list commands) point at `next_actions` for the
rest instead of dumping everything or truncating silently; nested
tables in human output now show a real "(N of M rows)" footer via
`Summary<T>`'s `PaginationMeta`.
- An operation query that resolves ambiguously or not at all is now a
proper error (`AMBIGUOUS_MATCH`/`NOT_FOUND`) with candidates listed in
the fix, rather than a success-shaped `{message, matches}` response.
- Adds `gddy guide api-explorer`, a user-facing walkthrough of the new
command surface.
- Bumps `cli-engine` to 0.8.2 for `CommandSpec::with_pagination`,
automatic array pagination, and nested-table pagination footers.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
There are a few user-facing correctness issues (invalid not-found “fix” command, incomplete next_action param metadata, and at least one test/header mismatch) that should be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR refactors the Rust API explorer command surface to support drill-down navigation for large outputs: operations are now browsed via api operation list/get, with new api parameter, api response, and api schema groups to inspect parameters, responses, and schema trees directly, and truncated previews linking to appropriate follow-up commands. It also introduces a reusable Summary<T> envelope for capped/nested table output and upgrades cli-engine to v0.8.x to support new pagination/rendering behavior.
Changes:
- Rename
api describe/api endpointtoapi operation get/api operation list, and addapi parameter,api response, andapi schemacommands for drill-down. - Add
Summary<T>(withPaginationMeta) for capped previews + “next action if truncated” linking, and improve ambiguous-operation handling as an error with candidate commands. - Add a user-facing guide (
gddy guide api-explorer) and bumpcli-enginefrom 0.7.x to 0.8.2.
File summaries
| File | Description |
|---|---|
| rust/tools/generate-api-catalog/src/main.rs | Updates generator docs to match the renamed api operation get command surface. |
| rust/src/summary.rs | Adds Summary<T> envelope for capped nested output with pagination metadata and truncation-aware next-actions. |
| rust/src/main.rs | Wires the new summary module into the binary. |
| rust/src/error.rs | Introduces a stable AMBIGUOUS_MATCH error code and helper constructor for ambiguous operation resolution. |
| rust/src/api_explorer/mod.rs | Major API explorer refactor: new command groups, new schema-id + schema-tree plumbing, capped previews + links, and new ambiguity/not-found behaviors. |
| rust/src/api_explorer/guides/api-explorer.md | Adds the api-explorer guide documenting the new command flow and drill-down semantics. |
| rust/Cargo.toml | Bumps cli-engine dependency to 0.8.x. |
| rust/Cargo.lock | Locks cli-engine to 0.8.2 and updates transitive deps (e.g., socket2). |
| docs/design/devex-967-api-explorer-drilldown.md | Removes the now-superseded design draft from docs/design. |
Review details
- Files reviewed: 7/9 changed files
- Comments generated: 5
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
- Point the not-found fix at `gddy api domain list` instead of `gddy api operation list`, which requires `--domain` and wasn't runnable as suggested. - Mark `<name>`/`<status>` as required next_action params on `parameter list`/`response list`'s follow-up hints, matching the `operation` param already there. - Reword `parameter get`/`response get`'s help text: the schema shown is a capped preview like everywhere else, not "complete" — the never-truncated structure is only `api schema get`'s. - Fix a doc-comment typo in Summary<T>. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The current schema drill-down logic fails to emit schemaId for some drillable array schemas (blocking navigation to api schema get) and should be corrected before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
- Files reviewed: 7/9 changed files
- Comments generated: 0 new
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Summary
api describe/api endpointtoapi operation get/api operation list, and addsapi parameter,api response, andapi schemacommand groups so an operation's parameters, responses, and schemas can be inspected individually instead of everything being inlined.typeand, when there's something to drill into (a$refor an inline object with properties), aschemaIdresolvable via the newapi schema get <id>.next_actionsfor the rest instead of dumping everything inline; nested tables in human output now show a real(N of M rows, ...)footer.gddy guide api-explorer, a user-facing guide for the new command surface.cli-engineto 0.8.2.Test plan
cargo check/cargo clippy -- -D warnings/cargo fmt --check/cargo testall passapi operation get,api parameter list/get,api response list/get,api schema get, ambiguous/not-found error paths, andgddy guide api-exploreragainst the built binary in both--output jsonand--output human🤖 Generated with Claude Code