Skip to content

feat(docs): discover and fetch live API documentation - #920

Open
amaskara-dd wants to merge 1 commit into
mainfrom
feat/live-api-docs
Open

amaskara-dd wants to merge 1 commit into
mainfrom
feat/live-api-docs

Conversation

@amaskara-dd

@amaskara-dd amaskara-dd commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add pup docs api so users can discover API topics and operations and read request/response documentation before calling pup api.
The command follows Datadog's live documentation indexes, so newly published documentation is available without updating Pup.

Changes

  • List topics with pup docs api or --list, and fetch topic Markdown with pup docs api monitors.
  • List operations with pup docs api monitors --operations, and fetch an operation with pup docs api monitors create-a-monitor.
  • Fetch indexed Markdown without authentication or caching; list names and titles as TSV.
  • Handle unknown names, HTTP failures, index cycles, unsafe links, redirects, and broken pipes.
  • Add discovery examples to pup api --help and document raw output behavior.

Testing

  • cargo test --offline -- --test-threads=1 passed, including 2,218 unit tests and integration tests.
  • cargo clippy --offline -- -D warnings and cargo fmt --check passed.
  • Live smoke tests discovered 188 topics and 31 monitor operations and fetched the create-monitor Request/Response documentation.
  • The parallel suite encountered shared mock-server environment interference; serial execution passed.
  • cargo audit unavailable locally (not installed); cross-platform builds remain for CI.

Add unauthenticated topic and operation discovery from the live Datadog documentation index, with raw Markdown fetching and CLI help examples.

Cover discovery, operation scoping, HTTP failures, safe links, output errors, and CLI argument validation.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@amaskara-dd
amaskara-dd marked this pull request as ready for review October 16, 2026 19:34
@amaskara-dd
amaskara-dd requested a review from a team as a code owner October 16, 2026 19:34

@datadog-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The static review found no reportable defect in documentation discovery, operation selection, or command integration. Execution validation was blocked by an unavailable Rust toolchain and pinned dependency.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit d30cad4

This branch has not been deployed

No deployments
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.

2 participants