Kotlin / dokka

API documentation engine for Kotlin
https://kotl.in/dokka
Apache License 2.0
3.45k stars 412 forks source link

[Dokka 2] Adding external documentation link to Ktor points to the wrong page #3889

Closed MGaetan89 closed 4 weeks ago

MGaetan89 commented 4 weeks ago

Describe the bug

In my project, I've added the following source set configuration in order to have links to the Ktor API documentation:

dokka {
    dokkaSourceSets.getByName("main") {
        externalDocumentationLinks.register("ktor") {
            url.set(URI("https://api.ktor.io"))
            packageListUrl.set(URI("https://api.ktor.io/package-list"))
        }
    }
}

However, my generated Dokka documentation points to the wrong link. For example, given the following KDoc:

import io.ktor.client.plugins.ClientRequestException

/**
 * Some documentation using [ClientRequestException].
 */

The link on ClientRequestException will point to: https://api.ktor.io/ktor-client-core/io.ktor.client.plugins/-client-request-exception/index.html instead of: https://api.ktor.io/ktor-client/ktor-client-core/io.ktor.client.plugins/-client-request-exception/index.html (note the missing ktor-client folder after the hostname).

Expected behaviour

The link on ClientRequestException should point to the right page.

Installation

whyoleg commented 4 weeks ago

same as https://github.com/Kotlin/dokka/issues/2444

MGaetan89 commented 4 weeks ago

Oops, sorry about that. I'll close this issue to keep the discussion in one place.