File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/main/kotlin/com/papsign/ktor/openapigen/route Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,25 @@ import com.papsign.ktor.openapigen.OpenAPIGen
44import com.papsign.ktor.openapigen.route.path.normal.NormalOpenAPIRoute
55import io.ktor.application.Application
66import io.ktor.application.feature
7+ import io.ktor.routing.Routing
78import io.ktor.routing.routing
89import io.ktor.util.pipeline.ContextDsl
910
1011@ContextDsl
1112fun Application.apiRouting (config : NormalOpenAPIRoute .() -> Unit ) {
1213 routing {
1314 NormalOpenAPIRoute (
14- this ,
15- application.feature(OpenAPIGen ).globalModuleProvider
15+ this ,
16+ application.feature(OpenAPIGen ).globalModuleProvider
1617 ).apply (config)
1718 }
1819}
1920
21+ @ContextDsl
22+ fun Routing.apiRouting (config : NormalOpenAPIRoute .() -> Unit ) {
23+ NormalOpenAPIRoute (
24+ this ,
25+ application.feature(OpenAPIGen ).globalModuleProvider
26+ ).apply (config)
27+ }
28+
You can’t perform that action at this time.
0 commit comments