Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.3.4"
".": "0.4.0"
}
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 0.4.0 (2026-01-23)

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

* **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)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- x-release-please-start-version -->

[![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)

<!-- x-release-please-end -->

Expand All @@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/).

<!-- x-release-please-start-version -->

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).

<!-- x-release-please-end -->

Expand All @@ -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
Expand All @@ -33,7 +33,7 @@ implementation("com.openlayer.api:openlayer-java:0.3.4")
<dependency>
<groupId>com.openlayer.api</groupId>
<artifactId>openlayer-java</artifactId>
<version>0.3.4</version>
<version>0.4.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions buildSrc/src/main/kotlin/openlayer.kotlin.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ kotlin {
tasks.withType<Test>().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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down Expand Up @@ -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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,15 @@ private constructor(
fun latencyColumnName(): Optional<String> =
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

/**
Expand Down Expand Up @@ -1945,7 +1953,15 @@ private constructor(
fun latencyColumnName(): Optional<String> =
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

/**
Expand Down Expand Up @@ -2543,7 +2559,15 @@ private constructor(
fun latencyColumnName(): Optional<String> =
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

/**
Expand Down Expand Up @@ -3048,7 +3072,15 @@ private constructor(
fun latencyColumnName(): Optional<String> =
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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()

/**
Expand Down Expand Up @@ -302,6 +308,12 @@ private constructor(
@JsonProperty("config") @ExcludeMissing config: JsonField<Config> = 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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down Expand Up @@ -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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()

/**
Expand Down Expand Up @@ -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

/**
Expand Down Expand Up @@ -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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down Expand Up @@ -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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down Expand Up @@ -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

/**
Expand Down
Loading