Closed ScottPierce closed 1 year ago
This is solved by using ignoredRouteSelectors
.
install(SwaggerUI) {
ignoredRouteSelectors = ignoredRouteSelectors + RateLimitRouteSelector::class
This should be documented somewhere, and ideally it'd be ignored by default, along with other ktor plugins.
Hi, your solution is the intended one. I'm not sure if i can easily ignore all "unnecessary" route-selectors by default, so i'd rather have the default-behaviour be an obviously weird-looking route than a route where a part is silently missing. I'll check again and make the documentation regarding these types of configs more obvious.
That makes sense. Instead of adding classes, which requires a reference to the library, we could always change it to a Set of String qualified class names that should be ignored.
That would allow us to add known ktor plugins like this, that should be automatically ignored.
When Using the Ktor Rate Limit Plugin, the routes are documented incorrectly, and show up with a prefix:
/ (RateLimit <rate limit name)/<your endpoint here>
.