From 7c20e0fe9951817e9f2f5496acbe11b6b1a31d5e Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sat, 29 Jun 2024 15:51:09 +0200 Subject: [PATCH] build: Update Kompendium --- gradle/libs.versions.toml | 2 +- .../app/revanced/api/configuration/OpenAPI.kt | 59 +++++++++---------- 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cf64623..101125f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -kompendium-core = "latest.release" +kompendium-core = "3.14.4" kotlin = "2.0.0" logback = "1.4.14" exposed = "0.41.1" diff --git a/src/main/kotlin/app/revanced/api/configuration/OpenAPI.kt b/src/main/kotlin/app/revanced/api/configuration/OpenAPI.kt index 1dd1fa7..50ee19a 100644 --- a/src/main/kotlin/app/revanced/api/configuration/OpenAPI.kt +++ b/src/main/kotlin/app/revanced/api/configuration/OpenAPI.kt @@ -16,40 +16,37 @@ import java.net.URI internal fun Application.configureOpenAPI() { install(NotarizedApplication()) { - spec = { - OpenApiSpec( - info = Info( - title = "ReVanced API", - version = applicationVersion, - description = "API server for ReVanced.", - contact = Contact( - name = "ReVanced", - url = URI("https://revanced.app"), - email = "contact@revanced.app", - ), - license = License( - name = "AGPLv3", - url = URI("https://github.com/ReVanced/revanced-api/blob/main/LICENSE"), - ), + spec = OpenApiSpec( + info = Info( + title = "ReVanced API", + version = applicationVersion, + description = "API server for ReVanced.", + contact = Contact( + name = "ReVanced", + url = URI("https://revanced.app"), + email = "contact@revanced.app", ), - components = Components( - securitySchemes = mutableMapOf( - "bearer" to BearerAuth(), - "basic" to BasicAuth(), - ), + license = License( + name = "AGPLv3", + url = URI("https://github.com/ReVanced/revanced-api/blob/main/LICENSE"), ), + ), + components = Components( + securitySchemes = mutableMapOf( + "bearer" to BearerAuth(), + "basic" to BasicAuth(), + ), + ), + ).apply { + servers += Server( + url = URI("https://api.revanced.app"), + description = "ReVanced API server", + ) - ).apply { - servers += Server( - url = URI("https://api.revanced.app"), - description = "ReVanced API server", - ) - - servers += Server( - url = URI("http://localhost:8888"), - description = "Local ReVanced API server", - ) - } + servers += Server( + url = URI("http://localhost:8888"), + description = "Local ReVanced API server", + ) } schemaConfigurator = KotlinXSchemaConfigurator()