fix: swagger ui bug (#177)
This commit is contained in:
@ -5,6 +5,10 @@ import io.ktor.response.respondRedirect
|
||||
import io.ktor.routing.Routing
|
||||
import io.ktor.routing.get
|
||||
|
||||
@Deprecated(
|
||||
"Webjar approach is deprecated",
|
||||
replaceWith = ReplaceWith("swagger()", "io.bkbn.kompendium.core.routes.swagger")
|
||||
)
|
||||
fun Routing.swaggerUI(openApiJsonUrl: String = "/openapi.json") {
|
||||
get("/swagger-ui") {
|
||||
call.respondRedirect("/webjars/swagger-ui/index.html?url=$openApiJsonUrl", true)
|
||||
|
Reference in New Issue
Block a user