All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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())
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy