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

GH-161 Check if WebJarHandler is already registered #166

Merged

Conversation

sauterl
Copy link
Contributor

@sauterl sauterl commented Feb 22, 2023

Resolves #161 by carefully checking if such a configured SwaggerWebJarHandler already exists and if not, registers one per SwaggerPlugin. Includes a unit test to demonstrate and confirm the new behaviour.

In the rare circumstance, that someone already would have a non SwaggerWebJarHanlder GET handler on the configured swagger webjar route, this implementation would -in my opinion- rightfully fail.

Replaces #162 due to polluted git history.

@dzikoysk dzikoysk marked this pull request as draft April 2, 2023 14:20
…xist

# Conflicts:
#	javalin-plugins/javalin-swagger-plugin/src/main/kotlin/io/javalin/openapi/plugin/swagger/SwaggerPlugin.kt
#	javalin-plugins/javalin-swagger-plugin/src/test/kotlin/io/javalin/openapi/plugin/swagger/SwaggerPluginTest.kt
@dzikoysk dzikoysk marked this pull request as ready for review April 26, 2023 15:30
@dzikoysk dzikoysk changed the title Resolved #161 by checking first if a webjarhandler is registered GH-161 Check if WebJarHandler is already registered Apr 26, 2023
@dzikoysk dzikoysk merged commit 5b30e1f into javalin:main Apr 26, 2023
@dzikoysk
Copy link
Member

Thanks! I've applied some changes we've spoked about in cr.

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.

Multiple Swagger UI's cannot co-exist
2 participants