Skip to content

chore(docs): use Bruno.apiDocs in generated API docs - #9640

Merged
arpit-bruno merged 1 commit into
usebruno:mainfrom
arpit-bruno:feat/bru-4801-generate-docs-api-docs
Oct 28, 2026
Merged

arpit-bruno merged 1 commit into
usebruno:mainfrom
arpit-bruno:feat/bru-4801-generate-docs-api-docs

Conversation

@arpit-bruno

@arpit-bruno arpit-bruno commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Ref: BRU-4801

Docs generated from the Bruno app and from bru docs generate now load the docs using Bruno.apiDocs instead of the old window.OpenCollection.

Problem

Bruno.apiDocs is now the documented way to load API docs, but every generated docs file still used the old window.OpenCollection. So each new export kept spreading the old API.

Fix

Updated the shared HTML generator in bruno-common (used by both the app and the CLI) to call Bruno.apiDocs and renamed the git link option in the generated HTML from gitCollectionUrl to repositoryUrl to match the new API. Tests are updated too. The generated docs look exactly the same as before, and older exported docs keep working.

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.
  • I've run the claude code review skill locally.

Summary by CodeRabbit

  • Documentation
    • Generated API documentation now initializes its renderer using the updated interface.
    • Collection links in generated documentation now use the repository URL, with credentials removed.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between ab6e3ef and 219a827.

Files selected for processing: 3
  • packages/bruno-cli/tests/commands/docs/generate.spec.js
  • packages/bruno-common/src/api-docs/index.spec.ts
  • packages/bruno-common/src/api-docs/index.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

Generated API documentation now initializes through Bruno.apiDocs and uses repositoryUrl for the optional Git link. Tests check the updated renderer call and repository URL behavior.

Changes

Generated API Docs

Layer / File(s) Summary
Update generated HTML and validate output
packages/bruno-common/src/api-docs/index.ts, packages/bruno-common/src/api-docs/index.spec.ts, packages/bruno-cli/tests/commands/docs/generate.spec.js
The HTML builder emits the sanitized Git URL as repositoryUrl and initializes the renderer with Bruno.apiDocs. Tests check the new renderer call and URL property, including cases with no link and stripped credentials.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: sachin-bruno

Merge Risk: Minimal · up to 219a8

No actionable merge-blocking risk is established by the available repository evidence.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "chore(docs): use Bruno.apiDocs in generated API docs" matches the main change. The PR switches the generated API docs HTML from window.OpenCollection to Bruno.apiDocs, and renames the gitCo…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "chore(docs): use Bruno.apiDocs in generated API docs" matches the main change. The PR switches the generated API docs HTML from window.OpenCollection to Bruno.apiDocs, and renames the gitCollectionUrl option to repositoryUrl. The title names the primary change and the affected output. It omits the option rename, which is a secondary detail. The title is concise, specific, and free of filler. The "chore(docs)" prefix is a conventional-commit type, and it fits a change to generated docs output.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3 files.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Docs wake to a new call
Bruno.apiDocs takes the stage
repositoryUrl joins in
Tests follow the changed path
Clean output takes its bow

Comment @coderabbitai help to get the list of available commands.

@arpit-bruno
arpit-bruno merged commit b3d9b0b into usebruno:main Oct 28, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants