Skip to content

feat(api-explorer): add command hyperlinks for large output [DEVEX-967] - #187

Merged
jpage-godaddy merged 2 commits into
mainfrom
implement-explorer-redesign
Aug 6, 2026
Merged

feat(api-explorer): add command hyperlinks for large output [DEVEX-967]#187
jpage-godaddy merged 2 commits into
mainfrom
implement-explorer-redesign

Conversation

@jpage-godaddy

Copy link
Copy Markdown
Collaborator

Summary

  • Renames api describe/api endpoint to api operation get/api operation list, and adds api parameter, api response, and api schema command groups so an operation's parameters, responses, and schemas can be inspected individually instead of everything being inlined.
  • Every parameter/response row now carries a type and, when there's something to drill into (a $ref or an inline object with properties), a schemaId resolvable via the new api schema get <id>.
  • Truncated previews point at next_actions for the rest instead of dumping everything inline; nested tables in human output now show a real (N of M rows, ...) footer.
  • An ambiguous or unresolved operation query is now a proper error with candidates listed in the fix, instead of a success-shaped response.
  • Adds gddy guide api-explorer, a user-facing guide for the new command surface.
  • Bumps cli-engine to 0.8.2.

Test plan

  • cargo check / cargo clippy -- -D warnings / cargo fmt --check / cargo test all pass
  • Manually exercised api operation get, api parameter list/get, api response list/get, api schema get, ambiguous/not-found error paths, and gddy guide api-explorer against the built binary in both --output json and --output human

🤖 Generated with Claude Code

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>
Copilot AI lite review requested due to automatic review settings August 6, 2026 01:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 endpoint to api operation get/api operation list, and add api parameter, api response, and api schema commands for drill-down.
  • Add Summary<T> (with PaginationMeta) 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 bump cli-engine from 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.

Comment thread rust/src/summary.rs Outdated
Comment thread rust/src/api_explorer/mod.rs
Comment thread rust/src/api_explorer/mod.rs
Comment thread rust/src/api_explorer/mod.rs Outdated
Comment thread rust/src/api_explorer/mod.rs
- 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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

@jpage-godaddy
jpage-godaddy merged commit bfcc4be into main Aug 6, 2026
5 checks passed
@jpage-godaddy
jpage-godaddy deleted the implement-explorer-redesign branch August 6, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants