com.papsign.ktor.openapigen.modules.ModuleProvider.kt Maven / Gradle / Ivy
package com.papsign.ktor.openapigen.modules
import com.papsign.ktor.openapigen.getKType
import kotlin.reflect.KType
interface ModuleProvider> {
fun ofType(type: KType): Collection
fun registerModule(module: OpenAPIModule, type: KType)
fun unRegisterModule(module: OpenAPIModule)
fun child(): THIS
}
inline fun ModuleProvider<*>.ofType(): Collection {
return ofType(getKType()) as Collection
}
inline fun ModuleProvider<*>.registerModule(module: T) {
return registerModule(module, getKType())
}