SMILEY4 / ktor-swagger-ui

Kotlin Ktor plugin to generate OpenAPI and provide Swagger UI
Apache License 2.0
182 stars 33 forks source link

Custom RouteSelectors generate // in the path #150

Closed jens-brimfors-wolt closed 3 weeks ago

jens-brimfors-wolt commented 1 month ago

Problem

When we define a route with a home-brewn RouteSelector, the RouteCollector#getPath function generates a double-slash in that place.

Demo

I made a test-case that shows the problem in action https://github.com/SMILEY4/ktor-swagger-ui/compare/develop...jens-brimfors-wolt:ktor-swagger-ui:handle_route-scoped_plugins

jens-brimfors-wolt commented 1 month ago

I made a PR for this to try to be helpful https://github.com/SMILEY4/ktor-swagger-ui/pull/149