Open hfhbd opened 2 years ago
+1 I'd replace older
with just the version name and 2.0.0
(or latest
, configurable) for the current one:
api.example.com/2.0.0
api.example.com/1.6.8
...
It's much easier to do pattern matching, more predictable and also "older" might have a negative connotation in some contexts. Just using the version name is more descriptive.
Is your feature request related to a problem? Please describe Ktor uses Dokka with the versioning plugin. The latest release of Ktor is 2.0.0, so it has many api changes. I still use an older version of Ktor (1.6.8) and use
externalDocumentationLink
to reference to Ktor. The docs url for ktor is:https://api.ktor.io
for the latest version andhttps://api.ktor.io/older/
for older versions. The last release before 2.0.0 was 1.6.8, so I useexternalDocumentationLink("https://api.ktor.io/")
.Problem: After a new release of ktor, I have to change my gradle script and to regenerate my docs, because the docs for Ktor 1.6.8 has moved from
https://api.ktor.io
tohttps://api.ktor.io/older/1.6.8
.Describe the solution you'd like I don't want to update my docs (theoretically only the links to ktor) just because ktor released a new version.
https://api.ktor.io/older/2.0.0
, to always allow specifying a version.version-list
file fromhttps://api.ktor.io
to get the right path (because versioning plugin allows a custom folder, defaultolder
).With this changes, dokka always generates links to
https://api.ktor.io/older/$version/...
, and use the version from the classpath.Describe alternatives you've considered Drop the customization of the folder in the versioning plugin and use always the version directly. This allows to build docs with correct links even offline.
Workaround Every time a used dependency is updated you have to specify the older path manually and to regenerate and publish docs again...
Additional context Support using different version of the same library would be nice too, but not required in first step. eg ktor-server 1.6.8 in my backend module but ktor-client 2.0.0 in my frontend module.
Are you willing to provide a PR? With help, sure