From c4e25d6b6c9820dbc483efac7ad71712fbda705e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Wed, 3 Jun 2026 19:31:15 +0200 Subject: [PATCH 1/6] style(gradle): Remove unused opt-ins --- server/build.gradle.kts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/server/build.gradle.kts b/server/build.gradle.kts index eba284a..eb7b9df 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -1,7 +1,3 @@ -@file:OptIn(ExperimentalWasmDsl::class) - -import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl - plugins { alias(opensavvyConventions.plugins.base) alias(opensavvyConventions.plugins.kotlin.library) -- 2.51.2 From 6301482b58fb9df1e1f215a841e9a6a70be7c479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Wed, 3 Jun 2026 19:32:46 +0200 Subject: [PATCH 2/6] docs(api): Fix broken documentation link --- api/src/commonMain/kotlin/Parameters.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/commonMain/kotlin/Parameters.kt b/api/src/commonMain/kotlin/Parameters.kt index da18a4b..95b263e 100644 --- a/api/src/commonMain/kotlin/Parameters.kt +++ b/api/src/commonMain/kotlin/Parameters.kt @@ -19,7 +19,7 @@ typealias ParameterStorage = MutableMap> typealias ParameterConstructor

= (ParameterStorage) -> P /** - * Additional parameters for [endpoints][Endpoint]. + * Additional parameters for [endpoints][AnyEndpoint]. * * Endpoints declare mandatory parameters, such as the identifier of the resource. * This abstract class allows to declare additional parameters in a type-safe manner. -- 2.51.2 From b78e429c49a6def97552b32b92a3e08609e33ebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Wed, 3 Jun 2026 19:33:11 +0200 Subject: [PATCH 3/6] style(api): Remove useless type bounds --- api/src/commonMain/kotlin/Parameters.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/commonMain/kotlin/Parameters.kt b/api/src/commonMain/kotlin/Parameters.kt index 95b263e..60871ed 100644 --- a/api/src/commonMain/kotlin/Parameters.kt +++ b/api/src/commonMain/kotlin/Parameters.kt @@ -106,7 +106,7 @@ abstract class Parameters( * } * ``` */ - protected fun parameter() = UnnamedParameter(null) + protected fun parameter() = UnnamedParameter(null) /** * Declares a parameter [name] of type [T]. @@ -122,7 +122,7 @@ abstract class Parameters( * } * ``` */ - protected fun parameter(name: String) = Parameter(name, null) + protected fun parameter(name: String) = Parameter(name, null) /** * Declares a list of parameters of type [T]. @@ -139,7 +139,7 @@ abstract class Parameters( * } * ``` */ - protected fun listParameter() = UnnamedListParameter() + protected fun listParameter() = UnnamedListParameter() /** * Declares a list of parameters [name] of type [T]. @@ -154,7 +154,7 @@ abstract class Parameters( * } * ``` */ - protected fun listParameter(name: String) = ListParameter(name) + protected fun listParameter(name: String) = ListParameter(name) override fun equals(other: Any?): Boolean { if (this === other) return true -- 2.51.2 From 2dc60828db0e201d90fc8b58406a2e28e3791a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Wed, 3 Jun 2026 19:33:41 +0200 Subject: [PATCH 4/6] style(api): Suppress inapplicable warnings --- api/src/commonMain/kotlin/Parameters.kt | 2 ++ api/src/commonTest/kotlin/UsersAndDepartments.kt | 1 + client/src/commonMain/kotlin/SpineResponse.kt | 1 + 3 files changed, 4 insertions(+) diff --git a/api/src/commonMain/kotlin/Parameters.kt b/api/src/commonMain/kotlin/Parameters.kt index 60871ed..b9b0969 100644 --- a/api/src/commonMain/kotlin/Parameters.kt +++ b/api/src/commonMain/kotlin/Parameters.kt @@ -208,6 +208,7 @@ abstract class Parameters( * * See [Parameters]. */ + @Suppress("unused") // The parameter T is unused for now but may be used in the future class UnnamedListParameter /** @@ -215,6 +216,7 @@ abstract class Parameters( * * See [Parameters]. */ + @Suppress("unused") // The parameter T is unused for now but may be used in the future class ListParameter( /** * Name of the parameter as it appears in the URL. diff --git a/api/src/commonTest/kotlin/UsersAndDepartments.kt b/api/src/commonTest/kotlin/UsersAndDepartments.kt index 1a7cf92..cac0520 100644 --- a/api/src/commonTest/kotlin/UsersAndDepartments.kt +++ b/api/src/commonTest/kotlin/UsersAndDepartments.kt @@ -5,6 +5,7 @@ package opensavvy.spine.api // It represents a simple API in which users are assigned to one or more departments +@Suppress("unused") // Don't complain about unused endpoints object Root : RootResource("api") { object Users : StaticResource("users", Root) { diff --git a/client/src/commonMain/kotlin/SpineResponse.kt b/client/src/commonMain/kotlin/SpineResponse.kt index 3e241ac..26f5505 100644 --- a/client/src/commonMain/kotlin/SpineResponse.kt +++ b/client/src/commonMain/kotlin/SpineResponse.kt @@ -69,6 +69,7 @@ suspend inline fun SpineResponse.bodyOrThrow(): Out /** * The exception thrown by [bodyOrThrow]. */ +@Suppress("CanBeParameter") // 'response' is unused in our code, but it's useful in user code class SpineReceptionException( val response: HttpResponse, body: String, -- 2.51.2 From 67b3749718cbec0fde85c402c0fba427ad9addbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Wed, 3 Jun 2026 19:34:06 +0200 Subject: [PATCH 5/6] style(api): Simplify & clean up --- api/src/commonMain/kotlin/Resource.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/api/src/commonMain/kotlin/Resource.kt b/api/src/commonMain/kotlin/Resource.kt index 932dac2..c4f2474 100644 --- a/api/src/commonMain/kotlin/Resource.kt +++ b/api/src/commonMain/kotlin/Resource.kt @@ -330,7 +330,7 @@ val Resource.hierarchy: Sequence * @see Resource.slug The segment of this specific resource. */ val Resource.fullSlug: String - get() = hierarchy.map { it.slug }.joinToString("/") + get() = hierarchy.joinToString("/") { it.slug } /** * Returns all endpoints that are declared on this resource or any of its children. @@ -340,7 +340,3 @@ val Resource.fullSlug: String */ val Resource.endpoints: Sequence get() = directEndpoints + children.flatMap { it.endpoints } - -internal fun Resource.extendPath(extension: String? = null) = - if (extension != null) "$fullSlug/$extension" - else fullSlug -- 2.51.2 From 42d6a17290fad77bcbe9e5f2716e7d6cce8c42c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Wed, 3 Jun 2026 19:39:53 +0200 Subject: [PATCH 6/6] docs(client): Fix typo --- client/src/commonMain/kotlin/SpineResponse.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/commonMain/kotlin/SpineResponse.kt b/client/src/commonMain/kotlin/SpineResponse.kt index 26f5505..194b4b2 100644 --- a/client/src/commonMain/kotlin/SpineResponse.kt +++ b/client/src/commonMain/kotlin/SpineResponse.kt @@ -98,7 +98,7 @@ internal suspend inline fun handleFailureUnchecked( /** * Exhaustively handle failures. * - * If the request is succesful, [transform] is called. + * If the request is successful, [transform] is called. * If the request fails with the error [F1], [handle1] is called. * * To learn more about failures, see [the documentation](https://spine.opensavvy.dev/failures.html). @@ -123,7 +123,7 @@ suspend inline fun SpineResponse SpineResponse< /** * Exhaustively handle failures. * - * If the request is succesful, [transform] is called. + * If the request is successful, [transform] is called. * If the request fails with an error, the corresponding handler is called. * * To learn more about failures, see [the documentation](https://spine.opensavvy.dev/failures.html). @@ -179,7 +179,7 @@ suspend inline fun Sp /** * Exhaustively handle failures. * - * If the request is succesful, [transform] is called. + * If the request is successful, [transform] is called. * If the request fails with an error, the corresponding handler is called. * * To learn more about failures, see [the documentation](https://spine.opensavvy.dev/failures.html). @@ -210,7 +210,7 @@ suspend inline fun