Skip to content

fix redoc url#905

Merged
shuvyA merged 1 commit intomasterfrom
shuvy/per-13387-fix-opal-server-redoc-url
Apr 28, 2026
Merged

fix redoc url#905
shuvyA merged 1 commit intomasterfrom
shuvy/per-13387-fix-opal-server-redoc-url

Conversation

@shuvyA
Copy link
Copy Markdown
Contributor

@shuvyA shuvyA commented Apr 28, 2026

Fixes Issue

Changes proposed

Screenshots

image

Summary of changes in packages/opal-server/opal_server/server.py:

  1. Imports (line 9–11): Added Request, get_redoc_html, HTMLResponse
  2. FastAPI constructor (line 203): Added redoc_url=None to disable the broken built-in Redoc
  3. Custom /redoc route (line 280–288): Added a root_path-aware handler that uses the CDN-hosted redoc JS — exactly the same pattern as the permit-backend fix in PR #2880

✻ Churned fo

Check List (Check all the applicable boxes)

  • I sign off on contributing this submission to open-source
  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Note to reviewers

@shuvyA shuvyA requested a review from zeevmoney April 28, 2026 09:54
@linear
Copy link
Copy Markdown

linear Bot commented Apr 28, 2026

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 28, 2026

Deploy Preview for opal-docs canceled.

Name Link
🔨 Latest commit 27aa4df
🔍 Latest deploy log https://app.netlify.com/projects/opal-docs/deploys/69f083c63b7514000892474d

@shuvyA shuvyA requested a review from omer9564 April 28, 2026 09:54
@zeevmoney zeevmoney requested a review from Copilot April 28, 2026 09:55
Copy link
Copy Markdown

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

Fixes the OPAL Server ReDoc endpoint by disabling FastAPI’s built-in ReDoc route and replacing it with a custom /redoc handler that correctly accounts for root_path and uses a CDN-hosted ReDoc bundle.

Changes:

  • Disable FastAPI’s built-in ReDoc route via redoc_url=None.
  • Add a custom /redoc endpoint that builds a root_path-aware openapi_url and serves ReDoc HTML using get_redoc_html.

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

@shuvyA shuvyA merged commit 03aa9ad into master Apr 28, 2026
16 checks passed
@shuvyA shuvyA deleted the shuvy/per-13387-fix-opal-server-redoc-url branch April 28, 2026 10:19
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.

5 participants