Closed UkiDelly closed 5 months ago
Hi,
you should be able to ignore the custom plugin in the url by adding it to the ignored selectors in the plugin config
install(SwaggerUI) {
ignoredRouteSelectors += AuthRouter::class
}
To get the lock-button, you have to mark the route as protected - either by wrapping it in an "authenticated-block" or - more fitting for your case - setting the "protected"-flag.
private val info: OpenApiRoute.() -> Unit = {
//...
securitySchemeName = "Jwt"
protected = true
//...
}
Thank you so much!
I made my own Jwt RouteSelector and using it to protect some routes.
This is my my custom plugin
The problem is, when i open the swagger UI and try to test the api, the
and also show in the url when i send a request like this
![screen-shot 2024 03 19_04 49 PM](https://github.com/SMILEY4/ktor-swagger-ui/assets/60603701/2a4bd44c-077c-485f-a522-930a362e140e)
toString()
shows in the route like thisIs there a option to hide that?
And also i declare a secureSchema
and apply it to a route
but the lock icon doesn't appear on the swagger UI
Is there something i missed?