Skip to content

fix(laravel): expose ReDoc/Scalar in docs footer#7942

Open
abderrahimghazali wants to merge 1 commit intoapi-platform:4.3from
abderrahimghazali:fix/laravel-redoc-discoverability
Open

fix(laravel): expose ReDoc/Scalar in docs footer#7942
abderrahimghazali wants to merge 1 commit intoapi-platform:4.3from
abderrahimghazali:fix/laravel-redoc-discoverability

Conversation

@abderrahimghazali
Copy link
Copy Markdown

@abderrahimghazali abderrahimghazali commented May 1, 2026

Q A
Branch? 4.3
Tickets Closes #7682
License MIT
Doc PR N/A

Mirrors the Symfony footer (SwaggerUi/index.html.twig#L84-L98) in the Laravel swagger-ui.blade.php: available formats plus an "Other API docs" switcher to ReDoc/Scalar/GraphiQL when each is enabled. Hidden under Scalar, which provides its own UI.

Also fixes originalRoute / originalRouteParams in SwaggerUiProcessor (the previous lookup relied on the Symfony-only _route attribute and was always null on Laravel) and passes the missing formats argument when wiring the processor.

@abderrahimghazali abderrahimghazali force-pushed the fix/laravel-redoc-discoverability branch from b2a14a6 to ebb78c2 Compare May 1, 2026 11:11
@soyuka
Copy link
Copy Markdown
Member

soyuka commented May 4, 2026

Thanks for the patch! Instead of this huge button on symfony we just have a few links on the bottom:

https://github.com/api-platform/core/blob/main/src/Symfony/Bundle/Resources/views/SwaggerUi/index.html.twig#L84-L98

Could we have the same? Also feel free to target 4.3, as we have this functionality already in Symfony we consider its a bug fix thanks!

@abderrahimghazali abderrahimghazali force-pushed the fix/laravel-redoc-discoverability branch from ebb78c2 to b74218a Compare May 4, 2026 16:29
@abderrahimghazali abderrahimghazali changed the base branch from main to 4.3 May 4, 2026 16:29
@abderrahimghazali abderrahimghazali changed the title fix(laravel): expose ReDoc/Scalar via UI switcher in docs view fix(laravel): expose ReDoc/Scalar in docs footer May 4, 2026
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.

Issues with redoc in laravel

2 participants