Skip to content
Merged
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.8.1"
".": "0.9.0"
}
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## 0.9.0 (2026-05-07)

Full Changelog: [v0.8.1...v0.9.0](https://github.com/openlayer-ai/openlayer-java/compare/v0.8.1...v0.9.0)

### Features

* **client:** improve logging ([5b7b996](https://github.com/openlayer-ai/openlayer-java/commit/5b7b996f6ba51b42fe7116131caf8e03ed001389))
* **client:** more robust error parsing ([28aef40](https://github.com/openlayer-ai/openlayer-java/commit/28aef408ee0ba8b68b4e5c3b7f8674f9538fb12c))
* **client:** support proxy authentication ([d34e16d](https://github.com/openlayer-ai/openlayer-java/commit/d34e16d3662aafa7a814b5756838333b077095f9))
* support setting headers via env ([b045b8e](https://github.com/openlayer-ai/openlayer-java/commit/b045b8ee4cbc7099734674e06706d0334e70a4fe))


### Performance Improvements

* **client:** create one json mapper ([74b6403](https://github.com/openlayer-ai/openlayer-java/commit/74b6403db4f6798234a9b98c73a8b59d0a88bf5b))


### Chores

* remove duplicated dokka setup ([dde1361](https://github.com/openlayer-ai/openlayer-java/commit/dde1361a5a6b2415c21f97a75b953beac1f173ad))
* **tests:** bump steady to v0.22.1 ([277c809](https://github.com/openlayer-ai/openlayer-java/commit/277c809aa93a31be85ff7b70b5e2d801244e1c69))


### Documentation

* clarify forwards compat behavior ([d8035d8](https://github.com/openlayer-ai/openlayer-java/commit/d8035d8f9ef26a29e80d6d0399f42591c1d33414))

## 0.8.1 (2026-04-10)

Full Changelog: [v0.8.0...v0.8.1](https://github.com/openlayer-ai/openlayer-java/compare/v0.8.0...v0.8.1)
Expand Down
44 changes: 36 additions & 8 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.8.1)
[![javadoc](https://javadoc.io/badge2/com.openlayer.api/openlayer-java/0.8.1/javadoc.svg)](https://javadoc.io/doc/com.openlayer.api/openlayer-java/0.8.1)
[![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.9.0)
[![javadoc](https://javadoc.io/badge2/com.openlayer.api/openlayer-java/0.9.0/javadoc.svg)](https://javadoc.io/doc/com.openlayer.api/openlayer-java/0.9.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.8.1).
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.9.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.8.1")
implementation("com.openlayer.api:openlayer-java:0.9.0")
```

### Maven
Expand All @@ -33,7 +33,7 @@ implementation("com.openlayer.api:openlayer-java:0.8.1")
<dependency>
<groupId>com.openlayer.api</groupId>
<artifactId>openlayer-java</artifactId>
<version>0.8.1</version>
<version>0.9.0</version>
</dependency>
```

Expand Down Expand Up @@ -299,8 +299,6 @@ The SDK throws custom unchecked exception types:

## Logging

The SDK uses the standard [OkHttp logging interceptor](https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor).

Enable logging by setting the `OPENLAYER_LOG` environment variable to `info`:

```sh
Expand All @@ -313,6 +311,19 @@ Or to `debug` for more verbose logging:
export OPENLAYER_LOG=debug
```

Or configure the client manually using the `logLevel` method:

```java
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.core.LogLevel;

OpenlayerClient client = OpenlayerOkHttpClient.builder()
.fromEnv()
.logLevel(LogLevel.INFO)
.build();
```

## ProGuard and R8

Although the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `openlayer-java-core` is published with a [configuration file](openlayer-java-core/src/main/resources/META-INF/proguard/openlayer-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).
Expand Down Expand Up @@ -407,6 +418,21 @@ OpenlayerClient client = OpenlayerOkHttpClient.builder()
.build();
```

If the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:

```java
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.core.http.ProxyAuthenticator;

OpenlayerClient client = OpenlayerOkHttpClient.builder()
.fromEnv()
.proxy(...)
// Or a custom implementation of `ProxyAuthenticator`.
.proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))
.build();
```

### Connection pooling

To customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:
Expand Down Expand Up @@ -661,7 +687,9 @@ In rare cases, the API may return a response that doesn't match the expected typ

By default, the SDK will not throw an exception in this case. It will throw [`OpenlayerInvalidDataException`](openlayer-java-core/src/main/kotlin/com/openlayer/api/errors/OpenlayerInvalidDataException.kt) only if you directly access the property.

If you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:
Validating the response is _not_ forwards compatible with new types from the API for existing fields.

If you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:

```java
import com.openlayer.api.models.inferencepipelines.data.DataStreamResponse;
Expand Down
3 changes: 1 addition & 2 deletions 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.8.1" // x-release-please-version
version = "0.9.0" // x-release-please-version
}

subprojects {
Expand All @@ -21,7 +21,6 @@ subprojects {
group = "Verification"
description = "Verifies all source files are formatted."
}
apply(plugin = "org.jetbrains.dokka")
}

subprojects {
Expand Down
1 change: 0 additions & 1 deletion openlayer-java-client-okhttp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dependencies {
api(project(":openlayer-java-core"))

implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")

testImplementation(kotlin("test"))
testImplementation("org.assertj:assertj-core:3.27.7")
Expand Down
Loading
Loading