Skip to content

Conversation

@Piairre
Copy link

@Piairre Piairre commented Nov 25, 2025

Q A
Branch? main
Tickets Fixes #2654
License MIT
Doc PR N/A

Description

When using a custom route name for Swagger UI documentation, the footer links (Swagger UI/ReDoc) were pointing to the hardcoded api_doc route instead of using the actual current route.

Changes

  • Updated src/Symfony/Bundle/Resources/views/SwaggerUi/index.html.twig to use originalRoute and originalRouteParams instead of api_doc route
  • This ensures footer links work correctly with custom route names

@soyuka
Copy link
Member

soyuka commented Nov 30, 2025

bug fix ? Can you target 4.2 please ?

@Piairre Piairre changed the base branch from main to 4.2 December 2, 2025 23:32
@Piairre Piairre changed the base branch from 4.2 to main December 2, 2025 23:35
@Piairre
Copy link
Author

Piairre commented Dec 2, 2025

Yes, this PR fixes a bug where the footer links in Swagger UI were not using the current route, leading to broken links in some setups
Closing this PR in favor of a fresh one on 4.2

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.

footer links incorrect when overriding swagger/OpenAPI route

2 participants