Kodein DI on Ktor documentation is wrong
bdudelsack opened this issue · comments
Boris Dudelsack commented
The DIPlugin
(kodein-di-framework-ktor-server-jvm) for the Ktor Framework does not have di()
extension as stated in the documentation at:
https://kosi-libs.org/kodein-di/7.12.0/framework/ktor.html
When i see right only closestDI
extension is available (https://github.com/kosi-libs/Kodein/blob/master/framework/ktor/kodein-di-framework-ktor-server-jvm/src/main/kotlin/org/kodein/di/ktor/closest.kt).
Call to di()
should be replaced with closestDI()
in all examples.
UPDATE: If the use of di()
is intended, then the following import must be documented:
import org.kodein.di.ktor.closestDI as di
Romain Boisselle commented
Documentation has been updated. Thank you for your contribution.