mirror of
https://github.com/revanced/revanced-api.git
synced 2025-04-29 14:14:29 +02:00
feat: Allow versioning by arbitrary path string
This commit is contained in:
parent
eca40a6979
commit
814d3c946e
@ -1,4 +1,4 @@
|
|||||||
api-version = 1
|
api-version = "v1"
|
||||||
cors-allowed-hosts = [
|
cors-allowed-hosts = [
|
||||||
"revanced.app",
|
"revanced.app",
|
||||||
"*.revanced.app"
|
"*.revanced.app"
|
||||||
|
@ -18,7 +18,7 @@ internal fun Application.configureRouting() = routing {
|
|||||||
|
|
||||||
installCache(5.minutes)
|
installCache(5.minutes)
|
||||||
|
|
||||||
route("/v${configuration.apiVersion}") {
|
route("/${configuration.apiVersion}") {
|
||||||
announcementsRoute()
|
announcementsRoute()
|
||||||
patchesRoute()
|
patchesRoute()
|
||||||
managerRoute()
|
managerRoute()
|
||||||
|
@ -45,7 +45,7 @@ internal class ConfigurationRepository(
|
|||||||
@SerialName("backend-service-name")
|
@SerialName("backend-service-name")
|
||||||
val backendServiceName: String,
|
val backendServiceName: String,
|
||||||
@SerialName("api-version")
|
@SerialName("api-version")
|
||||||
val apiVersion: Int = 1,
|
val apiVersion: String = "v1",
|
||||||
@SerialName("cors-allowed-hosts")
|
@SerialName("cors-allowed-hosts")
|
||||||
val corsAllowedHosts: Set<String>,
|
val corsAllowedHosts: Set<String>,
|
||||||
val endpoint: String,
|
val endpoint: String,
|
||||||
|
@ -183,7 +183,7 @@ private fun Route.installTokenRouteDocumentation() = installNotarizedRoute {
|
|||||||
"username=\"ReVanced\", " +
|
"username=\"ReVanced\", " +
|
||||||
"realm=\"ReVanced\", " +
|
"realm=\"ReVanced\", " +
|
||||||
"nonce=\"abc123\", " +
|
"nonce=\"abc123\", " +
|
||||||
"uri=\"/v${configuration.apiVersion}/token\", " +
|
"uri=\"/${configuration.apiVersion}/token\", " +
|
||||||
"algorithm=SHA-256, " +
|
"algorithm=SHA-256, " +
|
||||||
"response=\"yxz456\"",
|
"response=\"yxz456\"",
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user