Skip to content

Conversation

@lewisojile
Copy link
Contributor

This pull request updates the source of the Redoc JavaScript bundle used to render API documentation. The change switches the CDN from jsdelivr to redoc.ly, which is the official CDN for Redoc.

Documentation rendering update:

  • Changed the Redoc JavaScript bundle source in the HTML template in cla-backend-go/docs/doc.go to use the official Redoc CDN (cdn.redoc.ly) instead of jsdelivr.

Signed-off-by: lewisojile <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Nov 13, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Updated the Redoc CDN script source in two documentation generation files, replacing jsdelivr URLs with the official redoc.ly CDN. No functional logic or control-flow changes.

Changes

Cohort / File(s) Summary
Documentation script URL updates
cla-backend-go/docs/doc.go, cla-backend-go/v2/docs/doc.go
Replaced Redoc embed script source from jsdelivr (cdn.jsdelivr.net) to the official Redoc CDN (cdn.redoc.ly / redoc.ly) in generated HTML; no other code changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Potential review focus:

  • Confirm the new CDN URLs are intended and available.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: updating the ReDoc CDN URL from jsdelivr to redoc.ly, which directly addresses the linked issue.
Description check ✅ Passed The description clearly explains the change, specifying the CDN switch from jsdelivr to cdn.redoc.ly and the file affected, which relates to fixing API documentation rendering.
Linked Issues check ✅ Passed The code changes directly address CS-688 by updating the ReDoc CDN URL to the official source, which is the proposed fix for the API documentation rendering issue.
Out of Scope Changes check ✅ Passed The changes are limited to updating the Redoc CDN URL in documentation files, which is directly scoped to resolving the API documentation rendering issue outlined in CS-688.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch CS-688_fix-api-docs-loading-issue

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c409fd4 and 47511fb.

📒 Files selected for processing (1)
  • cla-backend-go/v2/docs/doc.go (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-test-lint
  • GitHub Check: cypress-functional
🔇 Additional comments (1)
cla-backend-go/v2/docs/doc.go (1)

53-53: Verify the ReDoc URL is working and test the documentation endpoint.

The CDN URL change to cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js is now confirmed to be accessible and returns a valid JavaScript bundle (HTTP 200 status). This is an improvement over using a third-party mirror.

However, before approving:

  1. Please verify that this URL change actually resolves the blank screen issue by testing the documentation endpoint in your local environment or test deployment.

  2. Consider version stability: Using latest means the ReDoc version will auto-update to new releases, which could introduce breaking changes. While this ensures you get bug fixes automatically, it sacrifices predictability. For production stability, consider pinning to a specific version like https://cdn.redoc.ly/redoc/v2.0.0/bundles/redoc.standalone.js (check ReDoc's latest stable version at their GitHub releases).

  3. No immediate blockers found with this change—the URL is valid and working.


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

Copilot finished reviewing on behalf of lewisojile November 13, 2025 15:07
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
cla-backend-go/docs/doc.go (1)

45-45: Good fix for the blank screen issue, but consider pinning to a specific version for stability.

The switch to the official Redoc CDN is working correctly (HTTP 200 verified). However, using /latest/ means the application will automatically fetch the newest version without control, which could introduce breaking changes or unexpected behavior.

Consider pinning to a specific version. The current latest stable version is v2.5.1 (released September 26, 2025):

-		<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
+		<script src="https://cdn.redoc.ly/redoc/v2.5.1/bundles/redoc.standalone.js"> </script>

Other stable versions available: v2.5.0, v2.4.0, v2.3.0, v2.2.0.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b8f72c2 and c409fd4.

📒 Files selected for processing (1)
  • cla-backend-go/docs/doc.go (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: CodeQL analysis (go)
  • GitHub Check: build-test-lint
  • GitHub Check: cypress-functional

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request updates the Redoc JavaScript bundle CDN source in the API documentation rendering template from jsdelivr to the official Redoc CDN (cdn.redoc.ly). The change also switches from the @next version tag to latest.

  • Updated the Redoc CDN URL to use the official cdn.redoc.ly domain
  • Changed version specifier from @next to latest in the new CDN format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<body>
<redoc spec-url='/v3/swagger.json'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Using latest as the version tag can lead to unexpected breaking changes when Redoc releases new versions. Consider pinning to a specific version (e.g., https://cdn.redoc.ly/redoc/v2.1.3/bundles/redoc.standalone.js) to ensure consistent rendering and avoid potential breaking changes in production.

Suggested change
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
<script src="https://cdn.redoc.ly/redoc/v2.1.3/bundles/redoc.standalone.js"> </script>

Copilot uses AI. Check for mistakes.
Signed-off-by: lewisojile <[email protected]>
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