Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align Swagger-UI Prefix Path with Swagger-WebMvc Behavior #2862

Merged

Conversation

abdelmoez-guetat
Copy link
Contributor

This pull request modifies the Swagger-UI prefix path behavior in the springdoc-openapi-starter-webflux-ui module to align it with the behavior of springdoc-openapi-starter-webmvc-ui. With this update, the Swagger-UI will be accessible at /swagger-ui/index.html instead of /webjars/swagger-ui/index.html.
Key Changes:

  1. Updated Resource Handler Path:

    Changed the resource handler registration to use the SWAGGER_UI_PREFIX constant, ensuring that Swagger-UI assets are now served from /swagger-ui/ instead of /webjars/swagger-ui/.

  2. Removed Unused Dependencies:

    Eliminated the SpringDocConfigProperties parameter from the SwaggerWebFluxConfigurer constructor and related references, simplifying the configuration.

  3. Unified Behavior:

    Standardized the path prefix behavior to match that of springdoc-openapi-starter-webmvc-ui, making the behavior consistent across different SpringDoc modules.

  4. Code Cleanup:

    Refactored imports, removed unused parameters, and improved formatting for clarity and maintainability.

@bnasslahsen
Copy link
Collaborator

@abdelmoez-guetat,

Your build is failing and looks like be creating multiple regressions.
I will let you review the build errors.

@abdelmoez-guetat abdelmoez-guetat force-pushed the fix-swaggerui-webflux-url branch from 181c64c to bb0405c Compare January 20, 2025 14:36
@abdelmoez-guetat
Copy link
Contributor Author

I updated the code and fixed the tests

@bnasslahsen bnasslahsen merged commit bb0405c into springdoc:main Jan 24, 2025
1 check passed
@bnasslahsen
Copy link
Collaborator

bnasslahsen commented Jan 24, 2025

@abdelmoez-guetat,

Thank you for your contribution to the project.
I have reviewed to minimize the impacts on the current implementation, using explicit definitions of the webjars-prefix.
Dont hesitate to test it again, before the next release.

bnasslahsen added a commit that referenced this pull request Jan 25, 2025
@abdelmoez-guetat abdelmoez-guetat deleted the fix-swaggerui-webflux-url branch January 28, 2025 08:53
@kdebski85
Copy link

@abdelmoez-guetat
Do you think this change might cause #2878 ?

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.

None yet

3 participants