papsign / Ktor-OpenAPI-Generator

Ktor OpenAPI/Swagger 3 Generator
Apache License 2.0
243 stars 42 forks source link

This dosen't support routes moduling ? #2

Closed ganeshmahajan1985 closed 4 years ago

ganeshmahajan1985 commented 4 years ago

This dosen't support routes moduling ?

Wicpar commented 4 years ago

Can you give a concrete example of what you mean? A link to the documentation ?

ganeshmahajan1985 commented 4 years ago

Example -

  1. Extend the routing using below code
fun Routing.rolesApi(roleService:RoleService) {
   route(path="/roles") {
    -----
  }
}
  1. Install
    install(Routing){
        --------
        rolesApi(roleService)
       -------
    }
Wicpar commented 4 years ago

ah yes, i just pushed a modification that allows you to do this:

fun Routing.rolesApi(roleService: RoleService) {
    apiRouting {
        route(path="/roles") {

        }
    }
}

this is the commit if you want to see how i did it.

ganeshmahajan1985 commented 4 years ago

Thanks! Its working now.