From a3c15dfddb29743be7d5b02f3a455c93da07cd47 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 03:32:48 +0000 Subject: [PATCH 1/7] chore(internal): update maven repo doc to include authentication --- scripts/upload-artifacts | 64 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/scripts/upload-artifacts b/scripts/upload-artifacts index 548d1527..10f3c705 100755 --- a/scripts/upload-artifacts +++ b/scripts/upload-artifacts @@ -96,8 +96,52 @@ generate_instructions() {

Stainless SDK Maven Repository

This is the Maven repository for your Stainless Java SDK build.

-

Directions

-

To use the uploaded Maven repository, add the following to your project's pom.xml:

+

Project configuration

+ +

The details depend on whether you're using Maven or Gradle as your build tool.

+ +

Maven

+ +

Add the following to your project's pom.xml:

+
<repositories>
+    <repository>
+        <id>stainless-sdk-repo</id>
+        <url>https://pkg.stainless.com/s/${PROJECT}/${SHA}/mvn</url>
+    </repository>
+</repositories>
+ +

Gradle

+

Add the following to your build.gradle file:

+
repositories {
+    maven {
+        url "https://pkg.stainless.com/s/${PROJECT}/${SHA}/mvn"
+    }
+}
+ +
+

Configuring authentication (if required)

+ +

Some accounts may require authentication to access the repository. If so, use the + following instructions, replacing YOUR_STAINLESS_API_TOKEN with your actual token.

+ +

Maven with authentication

+ +

First, ensure you have the following in your Maven settings.xml for repo authentication:

+
<servers>
+    <server>
+        <id>stainless-sdk-repo</id>
+        <configuration>
+            <httpHeaders>
+                <property>
+                    <name>Authorization</name>
+                    <value>Bearer YOUR_STAINLESS_API_TOKEN</value>
+                </property>
+            </httpHeaders>
+        </configuration>
+    </server>
+</servers>
+ +

Then, add the following to your project's pom.xml:

<repositories>
     <repository>
         <id>stainless-sdk-repo</id>
@@ -105,14 +149,24 @@ generate_instructions() {
     </repository>
 </repositories>
-

If you're using Gradle, add the following to your build.gradle file:

+

Gradle with authentication

+

Add the following to your build.gradle file:

repositories {
     maven {
-        url 'https://pkg.stainless.com/s/${PROJECT}/${SHA}/mvn'
+        url "https://pkg.stainless.com/s/${PROJECT}/${SHA}/mvn"
+        credentials(HttpHeaderCredentials) {
+            name = "Authorization"
+            value = "Bearer YOUR_STAINLESS_API_TOKEN"
+        }
+        authentication {
+            header(HttpHeaderAuthentication)
+        }
     }
 }
+
-

Once you've added the repository, you can include dependencies from it as usual. See your +

Using the repository

+

Once you've configured the repository, you can include dependencies from it as usual. See your project README for more details.

From 77f36cac8bcdf064272a371f2538b065df5427eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 03:33:33 +0000 Subject: [PATCH 2/7] feat(client): send `X-Stainless-Kotlin-Version` header --- .../src/main/kotlin/com/openlayer/api/core/ClientOptions.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/core/ClientOptions.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/core/ClientOptions.kt index 47f45260..526c782a 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/core/ClientOptions.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/core/ClientOptions.kt @@ -404,6 +404,7 @@ private constructor( headers.put("X-Stainless-Package-Version", getPackageVersion()) headers.put("X-Stainless-Runtime", "JRE") headers.put("X-Stainless-Runtime-Version", getJavaVersion()) + headers.put("X-Stainless-Kotlin-Version", KotlinVersion.CURRENT.toString()) apiKey?.let { if (!it.isEmpty()) { headers.put("Authorization", "Bearer $it") From acdb1fcb6659e10e763133180b96dd9a9250b4c0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 04:16:12 +0000 Subject: [PATCH 3/7] docs: add comment for arbitrary value fields --- .../testresults/TestResultListResponse.kt | 17 +++++++- .../data/DataStreamParams.kt | 40 +++++++++++++++++-- .../rows/RowUpdateParams.kt | 12 ++++++ .../testresults/TestResultListResponse.kt | 17 +++++++- .../models/projects/tests/TestCreateParams.kt | 25 +++++++++++- .../projects/tests/TestCreateResponse.kt | 16 +++++++- .../models/projects/tests/TestListResponse.kt | 16 +++++++- .../models/projects/tests/TestUpdateParams.kt | 16 +++++++- .../PresignedUrlCreateResponse.kt | 9 ++++- .../models/tests/TestListResultsResponse.kt | 34 +++++++++++++++- 10 files changed, 188 insertions(+), 14 deletions(-) diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/commits/testresults/TestResultListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/commits/testresults/TestResultListResponse.kt index d1de41cf..9ab343ef 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/commits/testresults/TestResultListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/commits/testresults/TestResultListResponse.kt @@ -1487,7 +1487,15 @@ private constructor( */ fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated") - /** The test description. */ + /** + * The test description. + * + * This arbitrary value can be deserialized into a custom type using the `convert` + * method: + * ```java + * MyClass myObject = goal.description().convert(MyClass.class); + * ``` + */ @JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description /** @@ -3508,6 +3516,13 @@ private constructor( */ fun name(): String = name.getRequired("name") + /** + * This arbitrary value can be deserialized into a custom type using the + * `convert` method: + * ```java + * MyClass myObject = insightParameter.value().convert(MyClass.class); + * ``` + */ @JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value /** diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/data/DataStreamParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/data/DataStreamParams.kt index dc7cf661..082e94eb 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/data/DataStreamParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/data/DataStreamParams.kt @@ -982,7 +982,15 @@ private constructor( fun latencyColumnName(): Optional = latencyColumnName.getOptional("latencyColumnName") - /** Object with metadata. */ + /** + * Object with metadata. + * + * This arbitrary value can be deserialized into a custom type using the `convert` + * method: + * ```java + * MyClass myObject = llmData.metadata().convert(MyClass.class); + * ``` + */ @JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonValue = metadata /** @@ -1945,7 +1953,15 @@ private constructor( fun latencyColumnName(): Optional = latencyColumnName.getOptional("latencyColumnName") - /** Object with metadata. */ + /** + * Object with metadata. + * + * This arbitrary value can be deserialized into a custom type using the `convert` + * method: + * ```java + * MyClass myObject = tabularClassificationData.metadata().convert(MyClass.class); + * ``` + */ @JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonValue = metadata /** @@ -2543,7 +2559,15 @@ private constructor( fun latencyColumnName(): Optional = latencyColumnName.getOptional("latencyColumnName") - /** Object with metadata. */ + /** + * Object with metadata. + * + * This arbitrary value can be deserialized into a custom type using the `convert` + * method: + * ```java + * MyClass myObject = tabularRegressionData.metadata().convert(MyClass.class); + * ``` + */ @JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonValue = metadata /** @@ -3048,7 +3072,15 @@ private constructor( fun latencyColumnName(): Optional = latencyColumnName.getOptional("latencyColumnName") - /** Object with metadata. */ + /** + * Object with metadata. + * + * This arbitrary value can be deserialized into a custom type using the `convert` + * method: + * ```java + * MyClass myObject = textClassificationData.metadata().convert(MyClass.class); + * ``` + */ @JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonValue = metadata /** diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/rows/RowUpdateParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/rows/RowUpdateParams.kt index 7d334a10..16e06f1b 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/rows/RowUpdateParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/rows/RowUpdateParams.kt @@ -35,6 +35,12 @@ private constructor( /** Specify the inference id as a query param. */ fun inferenceId(): String = inferenceId + /** + * This arbitrary value can be deserialized into a custom type using the `convert` method: + * ```java + * MyClass myObject = rowUpdateParams.row().convert(MyClass.class); + * ``` + */ fun _row(): JsonValue = body._row() /** @@ -302,6 +308,12 @@ private constructor( @JsonProperty("config") @ExcludeMissing config: JsonField = JsonMissing.of(), ) : this(row, config, mutableMapOf()) + /** + * This arbitrary value can be deserialized into a custom type using the `convert` method: + * ```java + * MyClass myObject = body.row().convert(MyClass.class); + * ``` + */ @JsonProperty("row") @ExcludeMissing fun _row(): JsonValue = row /** diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/testresults/TestResultListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/testresults/TestResultListResponse.kt index 2b836eeb..8e4f684f 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/testresults/TestResultListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/testresults/TestResultListResponse.kt @@ -1487,7 +1487,15 @@ private constructor( */ fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated") - /** The test description. */ + /** + * The test description. + * + * This arbitrary value can be deserialized into a custom type using the `convert` + * method: + * ```java + * MyClass myObject = goal.description().convert(MyClass.class); + * ``` + */ @JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description /** @@ -3508,6 +3516,13 @@ private constructor( */ fun name(): String = name.getRequired("name") + /** + * This arbitrary value can be deserialized into a custom type using the + * `convert` method: + * ```java + * MyClass myObject = insightParameter.value().convert(MyClass.class); + * ``` + */ @JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value /** diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestCreateParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestCreateParams.kt index b599fcde..e0fea77e 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestCreateParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestCreateParams.kt @@ -94,7 +94,14 @@ private constructor( */ fun dateUpdated(): OffsetDateTime = body.dateUpdated() - /** The test description. */ + /** + * The test description. + * + * This arbitrary value can be deserialized into a custom type using the `convert` method: + * ```java + * MyClass myObject = testCreateParams.description().convert(MyClass.class); + * ``` + */ fun _description(): JsonValue = body._description() /** @@ -1304,7 +1311,14 @@ private constructor( */ fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated") - /** The test description. */ + /** + * The test description. + * + * This arbitrary value can be deserialized into a custom type using the `convert` method: + * ```java + * MyClass myObject = body.description().convert(MyClass.class); + * ``` + */ @JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description /** @@ -3575,6 +3589,13 @@ private constructor( */ fun name(): String = name.getRequired("name") + /** + * This arbitrary value can be deserialized into a custom type using the `convert` + * method: + * ```java + * MyClass myObject = insightParameter.value().convert(MyClass.class); + * ``` + */ @JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value /** diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestCreateResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestCreateResponse.kt index 891c4626..cb52075d 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestCreateResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestCreateResponse.kt @@ -204,7 +204,14 @@ private constructor( */ fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated") - /** The test description. */ + /** + * The test description. + * + * This arbitrary value can be deserialized into a custom type using the `convert` method: + * ```java + * MyClass myObject = testCreateResponse.description().convert(MyClass.class); + * ``` + */ @JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description /** @@ -2380,6 +2387,13 @@ private constructor( */ fun name(): String = name.getRequired("name") + /** + * This arbitrary value can be deserialized into a custom type using the `convert` + * method: + * ```java + * MyClass myObject = insightParameter.value().convert(MyClass.class); + * ``` + */ @JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value /** diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestListResponse.kt index be96b44e..08aaa74d 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestListResponse.kt @@ -361,7 +361,14 @@ private constructor( */ fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated") - /** The test description. */ + /** + * The test description. + * + * This arbitrary value can be deserialized into a custom type using the `convert` method: + * ```java + * MyClass myObject = item.description().convert(MyClass.class); + * ``` + */ @JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description /** @@ -2578,6 +2585,13 @@ private constructor( */ fun name(): String = name.getRequired("name") + /** + * This arbitrary value can be deserialized into a custom type using the `convert` + * method: + * ```java + * MyClass myObject = insightParameter.value().convert(MyClass.class); + * ``` + */ @JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value /** diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestUpdateParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestUpdateParams.kt index 12449414..a0a49730 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestUpdateParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestUpdateParams.kt @@ -497,7 +497,14 @@ private constructor( */ fun archived(): Optional = archived.getOptional("archived") - /** The test description. */ + /** + * The test description. + * + * This arbitrary value can be deserialized into a custom type using the `convert` method: + * ```java + * MyClass myObject = payload.description().convert(MyClass.class); + * ``` + */ @JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description /** @@ -1619,6 +1626,13 @@ private constructor( */ fun name(): String = name.getRequired("name") + /** + * This arbitrary value can be deserialized into a custom type using the `convert` + * method: + * ```java + * MyClass myObject = insightParameter.value().convert(MyClass.class); + * ``` + */ @JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value /** diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/storage/presignedurl/PresignedUrlCreateResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/storage/presignedurl/PresignedUrlCreateResponse.kt index 63e56719..740def93 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/storage/presignedurl/PresignedUrlCreateResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/storage/presignedurl/PresignedUrlCreateResponse.kt @@ -49,7 +49,14 @@ private constructor( */ fun url(): String = url.getRequired("url") - /** Fields to include in the body of the upload. Only needed by s3 */ + /** + * Fields to include in the body of the upload. Only needed by s3 + * + * This arbitrary value can be deserialized into a custom type using the `convert` method: + * ```java + * MyClass myObject = presignedUrlCreateResponse.fields().convert(MyClass.class); + * ``` + */ @JsonProperty("fields") @ExcludeMissing fun _fields(): JsonValue = fields /** diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/tests/TestListResultsResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/tests/TestListResultsResponse.kt index 97b2feea..7dc68758 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/tests/TestListResultsResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/tests/TestListResultsResponse.kt @@ -1533,7 +1533,15 @@ private constructor( */ fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated") - /** The test description. */ + /** + * The test description. + * + * This arbitrary value can be deserialized into a custom type using the `convert` + * method: + * ```java + * MyClass myObject = goal.description().convert(MyClass.class); + * ``` + */ @JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description /** @@ -3554,6 +3562,13 @@ private constructor( */ fun name(): String = name.getRequired("name") + /** + * This arbitrary value can be deserialized into a custom type using the + * `convert` method: + * ```java + * MyClass myObject = insightParameter.value().convert(MyClass.class); + * ``` + */ @JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value /** @@ -8189,7 +8204,15 @@ private constructor( */ fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated") - /** The test description. */ + /** + * The test description. + * + * This arbitrary value can be deserialized into a custom type using the `convert` + * method: + * ```java + * MyClass myObject = goal.description().convert(MyClass.class); + * ``` + */ @JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description /** @@ -10210,6 +10233,13 @@ private constructor( */ fun name(): String = name.getRequired("name") + /** + * This arbitrary value can be deserialized into a custom type using the + * `convert` method: + * ```java + * MyClass myObject = insightParameter.value().convert(MyClass.class); + * ``` + */ @JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value /** From e688c8544109eec067139f1473d0d9ff487cc59b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 04:17:15 +0000 Subject: [PATCH 4/7] chore(internal): correct cache invalidation for `SKIP_MOCK_TESTS` --- buildSrc/src/main/kotlin/openlayer.kotlin.gradle.kts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildSrc/src/main/kotlin/openlayer.kotlin.gradle.kts b/buildSrc/src/main/kotlin/openlayer.kotlin.gradle.kts index 63438fd4..e8c2b61e 100644 --- a/buildSrc/src/main/kotlin/openlayer.kotlin.gradle.kts +++ b/buildSrc/src/main/kotlin/openlayer.kotlin.gradle.kts @@ -33,6 +33,9 @@ kotlin { tasks.withType().configureEach { systemProperty("junit.jupiter.execution.parallel.enabled", true) systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent") + + // `SKIP_MOCK_TESTS` affects which tests run so it must be added as input for proper cache invalidation. + inputs.property("skipMockTests", System.getenv("SKIP_MOCK_TESTS")).optional(true) } val ktfmt by configurations.creating From 5a2de356e6c859ba449dcfe286b357f27521fbd9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 04:20:54 +0000 Subject: [PATCH 5/7] fix(client): preserve time zone in lenient date-time parsing --- .../com/openlayer/api/core/ObjectMappers.kt | 19 +++++---- .../openlayer/api/core/ObjectMappersTest.kt | 41 +++++++++++++++---- 2 files changed, 44 insertions(+), 16 deletions(-) diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/core/ObjectMappers.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/core/ObjectMappers.kt index e3a325a7..560baaef 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/core/ObjectMappers.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/core/ObjectMappers.kt @@ -25,7 +25,7 @@ import java.time.DateTimeException import java.time.LocalDate import java.time.LocalDateTime import java.time.OffsetDateTime -import java.time.ZonedDateTime +import java.time.ZoneId import java.time.format.DateTimeFormatter import java.time.temporal.ChronoField @@ -157,14 +157,15 @@ private class LenientOffsetDateTimeDeserializer : val temporal = formatter.parse(p.text) return when { - !temporal.isSupported(ChronoField.HOUR_OF_DAY) -> - LocalDate.from(temporal).atStartOfDay() - !temporal.isSupported(ChronoField.OFFSET_SECONDS) -> - LocalDateTime.from(temporal) - else -> ZonedDateTime.from(temporal).toLocalDateTime() - } - .atZone(context.timeZone.toZoneId()) - .toOffsetDateTime() + !temporal.isSupported(ChronoField.HOUR_OF_DAY) -> + LocalDate.from(temporal) + .atStartOfDay() + .atZone(ZoneId.of("UTC")) + .toOffsetDateTime() + !temporal.isSupported(ChronoField.OFFSET_SECONDS) -> + LocalDateTime.from(temporal).atZone(ZoneId.of("UTC")).toOffsetDateTime() + else -> OffsetDateTime.from(temporal) + } } catch (e: DateTimeException) { exceptions.add(e) } diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/core/ObjectMappersTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/core/ObjectMappersTest.kt index 84f8c2fb..84493961 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/core/ObjectMappersTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/core/ObjectMappersTest.kt @@ -3,12 +3,14 @@ package com.openlayer.api.core import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.exc.MismatchedInputException import com.fasterxml.jackson.module.kotlin.readValue +import java.time.LocalDate +import java.time.LocalTime import java.time.OffsetDateTime +import java.time.ZoneOffset import kotlin.reflect.KClass import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.catchThrowable import org.junit.jupiter.api.Test -import org.junit.jupiter.api.assertDoesNotThrow import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.EnumSource import org.junitpioneer.jupiter.cartesian.CartesianTest @@ -72,11 +74,34 @@ internal class ObjectMappersTest { } } - enum class LenientOffsetDateTimeTestCase(val string: String) { - DATE("1998-04-21"), - DATE_TIME("1998-04-21T04:00:00"), - ZONED_DATE_TIME_1("1998-04-21T04:00:00+03:00"), - ZONED_DATE_TIME_2("1998-04-21T04:00:00Z"), + enum class LenientOffsetDateTimeTestCase( + val string: String, + val expectedOffsetDateTime: OffsetDateTime, + ) { + DATE( + "1998-04-21", + expectedOffsetDateTime = + OffsetDateTime.of(LocalDate.of(1998, 4, 21), LocalTime.of(0, 0), ZoneOffset.UTC), + ), + DATE_TIME( + "1998-04-21T04:00:00", + expectedOffsetDateTime = + OffsetDateTime.of(LocalDate.of(1998, 4, 21), LocalTime.of(4, 0), ZoneOffset.UTC), + ), + ZONED_DATE_TIME_1( + "1998-04-21T04:00:00+03:00", + expectedOffsetDateTime = + OffsetDateTime.of( + LocalDate.of(1998, 4, 21), + LocalTime.of(4, 0), + ZoneOffset.ofHours(3), + ), + ), + ZONED_DATE_TIME_2( + "1998-04-21T04:00:00Z", + expectedOffsetDateTime = + OffsetDateTime.of(LocalDate.of(1998, 4, 21), LocalTime.of(4, 0), ZoneOffset.UTC), + ), } @ParameterizedTest @@ -85,6 +110,8 @@ internal class ObjectMappersTest { val jsonMapper = jsonMapper() val json = jsonMapper.writeValueAsString(testCase.string) - assertDoesNotThrow { jsonMapper().readValue(json) } + val offsetDateTime = jsonMapper().readValue(json) + + assertThat(offsetDateTime).isEqualTo(testCase.expectedOffsetDateTime) } } From 70b357fd2d1743f7f6e34ae03fa8cba898c65a3b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 24 Jan 2026 04:02:39 +0000 Subject: [PATCH 6/7] chore(ci): upgrade `actions/github-script` --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5fce658c..2cbe04bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: - name: Get GitHub OIDC Token if: github.repository == 'stainless-sdks/openlayer-java' id: github-oidc - uses: actions/github-script@v6 + uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); From a918256d7cc0b3f1107ae306181290ca3984f8ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 24 Jan 2026 04:02:57 +0000 Subject: [PATCH 7/7] release: 0.4.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 25 +++++++++++++++++++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bf7b7330..da59f99e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.4" + ".": "0.4.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3acfba88..d81bec90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 0.4.0 (2026-01-24) + +Full Changelog: [v0.3.4...v0.4.0](https://github.com/openlayer-ai/openlayer-java/compare/v0.3.4...v0.4.0) + +### Features + +* **client:** send `X-Stainless-Kotlin-Version` header ([77f36ca](https://github.com/openlayer-ai/openlayer-java/commit/77f36cac8bcdf064272a371f2538b065df5427eb)) + + +### Bug Fixes + +* **client:** preserve time zone in lenient date-time parsing ([5a2de35](https://github.com/openlayer-ai/openlayer-java/commit/5a2de356e6c859ba449dcfe286b357f27521fbd9)) + + +### Chores + +* **ci:** upgrade `actions/github-script` ([70b357f](https://github.com/openlayer-ai/openlayer-java/commit/70b357fd2d1743f7f6e34ae03fa8cba898c65a3b)) +* **internal:** correct cache invalidation for `SKIP_MOCK_TESTS` ([e688c85](https://github.com/openlayer-ai/openlayer-java/commit/e688c8544109eec067139f1473d0d9ff487cc59b)) +* **internal:** update maven repo doc to include authentication ([a3c15df](https://github.com/openlayer-ai/openlayer-java/commit/a3c15dfddb29743be7d5b02f3a455c93da07cd47)) + + +### Documentation + +* add comment for arbitrary value fields ([acdb1fc](https://github.com/openlayer-ai/openlayer-java/commit/acdb1fcb6659e10e763133180b96dd9a9250b4c0)) + ## 0.3.4 (2026-01-17) Full Changelog: [v0.3.3...v0.3.4](https://github.com/openlayer-ai/openlayer-java/compare/v0.3.3...v0.3.4) diff --git a/README.md b/README.md index cc98c1f2..b2bfa6aa 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.openlayer.api/openlayer-java)](https://central.sonatype.com/artifact/com.openlayer.api/openlayer-java/0.3.4) -[![javadoc](https://javadoc.io/badge2/com.openlayer.api/openlayer-java/0.3.4/javadoc.svg)](https://javadoc.io/doc/com.openlayer.api/openlayer-java/0.3.4) +[![Maven Central](https://img.shields.io/maven-central/v/com.openlayer.api/openlayer-java)](https://central.sonatype.com/artifact/com.openlayer.api/openlayer-java/0.4.0) +[![javadoc](https://javadoc.io/badge2/com.openlayer.api/openlayer-java/0.4.0/javadoc.svg)](https://javadoc.io/doc/com.openlayer.api/openlayer-java/0.4.0) @@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/). -The REST API documentation can be found on [openlayer.com](https://openlayer.com/docs/api-reference/rest/overview). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openlayer.api/openlayer-java/0.3.4). +The REST API documentation can be found on [openlayer.com](https://openlayer.com/docs/api-reference/rest/overview). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openlayer.api/openlayer-java/0.4.0). @@ -24,7 +24,7 @@ The REST API documentation can be found on [openlayer.com](https://openlayer.com ### Gradle ```kotlin -implementation("com.openlayer.api:openlayer-java:0.3.4") +implementation("com.openlayer.api:openlayer-java:0.4.0") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.openlayer.api:openlayer-java:0.3.4") com.openlayer.api openlayer-java - 0.3.4 + 0.4.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index bb369018..bc31f752 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.openlayer.api" - version = "0.3.4" // x-release-please-version + version = "0.4.0" // x-release-please-version } subprojects {