Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
46abca4
chore(internal): codegen related update
stainless-app[bot] Jan 20, 2026
eaca79d
feat(api): api update
stainless-app[bot] Jan 21, 2026
9aa3e27
chore(internal): update maven repo doc to include authentication
stainless-app[bot] Jan 21, 2026
10357a9
feat(client): send `X-Stainless-Kotlin-Version` header
stainless-app[bot] Jan 21, 2026
e2f42d1
docs: add comment for arbitrary value fields
stainless-app[bot] Jan 22, 2026
4a49c05
chore(internal): correct cache invalidation for `SKIP_MOCK_TESTS`
stainless-app[bot] Jan 22, 2026
928bfae
fix(client): preserve time zone in lenient date-time parsing
stainless-app[bot] Jan 23, 2026
7850067
chore(ci): upgrade `actions/github-script`
stainless-app[bot] Jan 23, 2026
1e5f897
feat(api): api update
stainless-app[bot] Jan 23, 2026
b8b2251
chore(internal): codegen related update
stainless-app[bot] Jan 27, 2026
ffbc747
chore(internal): allow passing args to `./scripts/test`
stainless-app[bot] Jan 30, 2026
49d56e2
feat(api): api update
stainless-app[bot] Feb 3, 2026
719f036
chore(internal): upgrade AssertJ
stainless-app[bot] Feb 6, 2026
69429b9
feat(api): api update
stainless-app[bot] Feb 10, 2026
acb4297
codegen metadata
stainless-app[bot] Feb 11, 2026
489bdd6
chore(internal): codegen related update
stainless-app[bot] Feb 11, 2026
a80ec0b
feat(api): api update
stainless-app[bot] Feb 12, 2026
5ba9c33
feat(api): manual updates
stainless-app[bot] Feb 12, 2026
c310e36
feat(api): api update
stainless-app[bot] Feb 16, 2026
3447469
chore(internal): update `TestServerExtension` comment
stainless-app[bot] Feb 17, 2026
3b82472
feat(api): api update
stainless-app[bot] Feb 18, 2026
05a1acc
chore(internal): make `OkHttp` constructor internal
stainless-app[bot] Feb 18, 2026
f56884d
feat(client): add more convenience service method overloads
stainless-app[bot] Feb 18, 2026
21b4047
feat(client): add connection pooling option
stainless-app[bot] Feb 18, 2026
ededc4d
feat(api): api update
stainless-app[bot] Feb 19, 2026
7661c8c
feat(api): api update
stainless-app[bot] Feb 21, 2026
39c553f
chore: make `Properties` more resilient to `null`
stainless-app[bot] Feb 23, 2026
edcdb51
chore: drop apache dependency
stainless-app[bot] Feb 23, 2026
c1195af
chore(internal): expand imports
stainless-app[bot] Feb 24, 2026
d101825
chore(docs): add missing descriptions
stainless-app[bot] Feb 27, 2026
522cf9b
feat(api): api update
stainless-app[bot] Feb 27, 2026
4ed5e39
feat(api): api update
stainless-app[bot] Mar 4, 2026
185d18d
fix: fix request delays for retrying to be more respectful of high re…
stainless-app[bot] Mar 5, 2026
82f17f8
chore(internal): bump palantir-java-format
stainless-app[bot] Mar 5, 2026
efdd6eb
chore(test): do not count install time for mock server timeout
stainless-app[bot] Mar 5, 2026
014ce03
feat(api): api update
stainless-app[bot] Mar 5, 2026
037dbcd
feat(api): api update
stainless-app[bot] Mar 7, 2026
2b236e9
chore(ci): skip uploading artifacts on stainless-internal branches
stainless-app[bot] Mar 7, 2026
aecff42
release: 1.11.0
stainless-app[bot] Mar 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,18 @@ jobs:
run: ./scripts/build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/orb-java'
if: |-
github.repository == 'stainless-sdks/orb-java' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v6
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Build and upload Maven artifacts
if: github.repository == 'stainless-sdks/orb-java'
if: |-
github.repository == 'stainless-sdks/orb-java' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.10.0"
".": "1.11.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 126
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c131de17773b450eb1ec03ca001f94d3777e35347234869a7efee083003e1513.yml
openapi_spec_hash: 5d2d4a3a9ada1c381efb318b6897994d
config_hash: bcf82bddb691f6be773ac6cae8c03b9a
configured_endpoints: 139
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d6a851f21804170f796637f1911c3382f1c57f5ed6b9b77cd7d0c6f74c06e174.yml
openapi_spec_hash: 82df33badf54d0c7087a61145d379f58
config_hash: 3279841440b02d4e8303c961d6983492
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
# Changelog

## 1.11.0 (2026-03-07)

Full Changelog: [v1.10.0...v1.11.0](https://github.com/orbcorp/orb-java/compare/v1.10.0...v1.11.0)

### Features

* **api:** api update ([037dbcd](https://github.com/orbcorp/orb-java/commit/037dbcde5fbff819b3a65b43bdc92332a88d96e5))
* **api:** api update ([014ce03](https://github.com/orbcorp/orb-java/commit/014ce038155006c8874869d82da451b427b5a177))
* **api:** api update ([4ed5e39](https://github.com/orbcorp/orb-java/commit/4ed5e399e2aeb4ba507314f37ebe510a7f4dcecf))
* **api:** api update ([522cf9b](https://github.com/orbcorp/orb-java/commit/522cf9bee689650a217f54f12d93f1c548994fa0))
* **api:** api update ([7661c8c](https://github.com/orbcorp/orb-java/commit/7661c8c5892a01032cf4b24a74b309a2eac77f0c))
* **api:** api update ([ededc4d](https://github.com/orbcorp/orb-java/commit/ededc4dcf7a0dcbe132f60e4e06b7c0b3c538caa))
* **api:** api update ([3b82472](https://github.com/orbcorp/orb-java/commit/3b8247255097a5250b47059ca568429a26e0f285))
* **api:** api update ([c310e36](https://github.com/orbcorp/orb-java/commit/c310e36ffe22fafdd5ba9a00728e7816a8d0e1e6))
* **api:** api update ([a80ec0b](https://github.com/orbcorp/orb-java/commit/a80ec0b34dabf9595dbae9dfc4b4ed6c914cf5d2))
* **api:** api update ([69429b9](https://github.com/orbcorp/orb-java/commit/69429b99a2aa15ce52ebd45f7a2a531395f3dc94))
* **api:** api update ([49d56e2](https://github.com/orbcorp/orb-java/commit/49d56e2d1ef966ebf6ad4508c81b43a19e7cf9c5))
* **api:** api update ([1e5f897](https://github.com/orbcorp/orb-java/commit/1e5f8972d4dd8c4c955e8980b0c83901a2594bd6))
* **api:** api update ([eaca79d](https://github.com/orbcorp/orb-java/commit/eaca79da23a8cad0430abcb0319c8a37a5bbfc2a))
* **api:** manual updates ([5ba9c33](https://github.com/orbcorp/orb-java/commit/5ba9c33bba4f76344046e7cd93946fe96befaf34))
* **client:** add connection pooling option ([21b4047](https://github.com/orbcorp/orb-java/commit/21b4047e592f1d92782f6aacba9ba0f4d8d893d2))
* **client:** add more convenience service method overloads ([f56884d](https://github.com/orbcorp/orb-java/commit/f56884dcd6437584dabd311bf0583c6145515e60))
* **client:** send `X-Stainless-Kotlin-Version` header ([10357a9](https://github.com/orbcorp/orb-java/commit/10357a946d98ffd0cb26409f81af477b4c4638b2))


### Bug Fixes

* **client:** preserve time zone in lenient date-time parsing ([928bfae](https://github.com/orbcorp/orb-java/commit/928bfae14d9e8353f052404bf80873f1bd60d167))
* fix request delays for retrying to be more respectful of high requested delays ([185d18d](https://github.com/orbcorp/orb-java/commit/185d18dd791129bdbcf9c7c0fe12cdeb34474045))


### Chores

* **ci:** skip uploading artifacts on stainless-internal branches ([2b236e9](https://github.com/orbcorp/orb-java/commit/2b236e90a64e621b2f772208c4048ccb1f26c066))
* **ci:** upgrade `actions/github-script` ([7850067](https://github.com/orbcorp/orb-java/commit/7850067ac12719de79ff00ada02962f035782791))
* **docs:** add missing descriptions ([d101825](https://github.com/orbcorp/orb-java/commit/d101825fc5db427bb9d36c6b82154919eea85103))
* drop apache dependency ([edcdb51](https://github.com/orbcorp/orb-java/commit/edcdb514ff66cba287aab7ec5dec282078abb45f))
* **internal:** allow passing args to `./scripts/test` ([ffbc747](https://github.com/orbcorp/orb-java/commit/ffbc7473823b4ea0ccd27b9cfb85f8a5c165bb47))
* **internal:** bump palantir-java-format ([82f17f8](https://github.com/orbcorp/orb-java/commit/82f17f8f9081527292cc9ca2bc150d10b2b9dfc1))
* **internal:** codegen related update ([489bdd6](https://github.com/orbcorp/orb-java/commit/489bdd632da69ee3bafce9d5364861821f235c2b))
* **internal:** codegen related update ([b8b2251](https://github.com/orbcorp/orb-java/commit/b8b2251ef940a4d3a5276a9287bfc628fcc7fa2b))
* **internal:** codegen related update ([46abca4](https://github.com/orbcorp/orb-java/commit/46abca478b99884a07ac874f56f5ab7f615d9162))
* **internal:** correct cache invalidation for `SKIP_MOCK_TESTS` ([4a49c05](https://github.com/orbcorp/orb-java/commit/4a49c05fd112adb44adebff7481d4076ede46058))
* **internal:** expand imports ([c1195af](https://github.com/orbcorp/orb-java/commit/c1195afe5fc1798dbfd9c8c183501d1e4f33db75))
* **internal:** make `OkHttp` constructor internal ([05a1acc](https://github.com/orbcorp/orb-java/commit/05a1acc5dd4128fe698db34626ebaaed97ad17f6))
* **internal:** update `TestServerExtension` comment ([3447469](https://github.com/orbcorp/orb-java/commit/34474693bac76cf4855636d09bac7001108f2ccc))
* **internal:** update maven repo doc to include authentication ([9aa3e27](https://github.com/orbcorp/orb-java/commit/9aa3e2745cf3794784ee229af579142c6d560182))
* **internal:** upgrade AssertJ ([719f036](https://github.com/orbcorp/orb-java/commit/719f036e81d72bf5c80a3e53de1e6fcdee49f15e))
* make `Properties` more resilient to `null` ([39c553f](https://github.com/orbcorp/orb-java/commit/39c553f7b878162f7affd567e9c0450d1411e653))
* **test:** do not count install time for mock server timeout ([efdd6eb](https://github.com/orbcorp/orb-java/commit/efdd6ebf4a150e21f6edc283f5cd8f91ed049b12))


### Documentation

* add comment for arbitrary value fields ([e2f42d1](https://github.com/orbcorp/orb-java/commit/e2f42d1f5d5b951c50798e943a64e14ff134b4f2))

## 1.10.0 (2026-01-17)

Full Changelog: [v1.9.0...v1.10.0](https://github.com/orbcorp/orb-java/compare/v1.9.0...v1.10.0)
Expand Down
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

[![Maven Central](https://img.shields.io/maven-central/v/com.withorb.api/orb-java)](https://central.sonatype.com/artifact/com.withorb.api/orb-java/1.10.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.withorb.api/orb-java)](https://central.sonatype.com/artifact/com.withorb.api/orb-java/1.11.0)

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

Expand All @@ -19,7 +19,7 @@ The REST API documentation can be found on [docs.withorb.com](https://docs.witho
### Gradle

```kotlin
implementation("com.withorb.api:orb-java:1.10.0")
implementation("com.withorb.api:orb-java:1.11.0")
```

### Maven
Expand All @@ -28,7 +28,7 @@ implementation("com.withorb.api:orb-java:1.10.0")
<dependency>
<groupId>com.withorb.api</groupId>
<artifactId>orb-java</artifactId>
<version>1.10.0</version>
<version>1.11.0</version>
</dependency>
```

Expand Down Expand Up @@ -457,6 +457,25 @@ OrbClient client = OrbOkHttpClient.builder()
.build();
```

### Connection pooling

To customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:

```java
import com.withorb.api.client.OrbClient;
import com.withorb.api.client.okhttp.OrbOkHttpClient;
import java.time.Duration;

OrbClient client = OrbOkHttpClient.builder()
.fromEnv()
// If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.
.maxIdleConnections(10)
.keepAliveDuration(Duration.ofMinutes(2))
.build();
```

If both options are unset, OkHttp's default connection pool settings are used.

### HTTPS

> [!NOTE]
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
allprojects {
group = "com.withorb.api"
version = "1.10.0" // x-release-please-version
version = "1.11.0" // x-release-please-version
}

subprojects {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/orb.java.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ tasks.withType<Test>().configureEach {

val palantir by configurations.creating
dependencies {
palantir("com.palantir.javaformat:palantir-java-format:2.73.0")
palantir("com.palantir.javaformat:palantir-java-format:2.89.0")
}

fun registerPalantir(
Expand Down
3 changes: 3 additions & 0 deletions buildSrc/src/main/kotlin/orb.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
4 changes: 0 additions & 4 deletions examples/.keep

This file was deleted.

2 changes: 1 addition & 1 deletion orb-java-client-okhttp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ dependencies {
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")

testImplementation(kotlin("test"))
testImplementation("org.assertj:assertj-core:3.25.3")
testImplementation("org.assertj:assertj-core:3.27.7")
testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.2")
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ import java.time.Duration
import java.util.concurrent.CancellationException
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ExecutorService
import java.util.concurrent.TimeUnit
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.SSLSocketFactory
import javax.net.ssl.X509TrustManager
import okhttp3.Call
import okhttp3.Callback
import okhttp3.ConnectionPool
import okhttp3.Dispatcher
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.MediaType
Expand All @@ -33,7 +35,7 @@ import okhttp3.logging.HttpLoggingInterceptor
import okio.BufferedSink

class OkHttpClient
private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClient) : HttpClient {
internal constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClient) : HttpClient {

override fun execute(request: HttpRequest, requestOptions: RequestOptions): HttpResponse {
val call = newCall(request, requestOptions)
Expand Down Expand Up @@ -200,6 +202,8 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien

private var timeout: Timeout = Timeout.default()
private var proxy: Proxy? = null
private var maxIdleConnections: Int? = null
private var keepAliveDuration: Duration? = null
private var dispatcherExecutorService: ExecutorService? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
Expand All @@ -211,6 +215,28 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien

fun proxy(proxy: Proxy?) = apply { this.proxy = proxy }

/**
* Sets the maximum number of idle connections kept by the underlying [ConnectionPool].
*
* If this is set, then [keepAliveDuration] must also be set.
*
* If unset, then OkHttp's default is used.
*/
fun maxIdleConnections(maxIdleConnections: Int?) = apply {
this.maxIdleConnections = maxIdleConnections
}

/**
* Sets the keep-alive duration for idle connections in the underlying [ConnectionPool].
*
* If this is set, then [maxIdleConnections] must also be set.
*
* If unset, then OkHttp's default is used.
*/
fun keepAliveDuration(keepAliveDuration: Duration?) = apply {
this.keepAliveDuration = keepAliveDuration
}

fun dispatcherExecutorService(dispatcherExecutorService: ExecutorService?) = apply {
this.dispatcherExecutorService = dispatcherExecutorService
}
Expand Down Expand Up @@ -240,6 +266,22 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
.apply {
dispatcherExecutorService?.let { dispatcher(Dispatcher(it)) }

val maxIdleConnections = maxIdleConnections
val keepAliveDuration = keepAliveDuration
if (maxIdleConnections != null && keepAliveDuration != null) {
connectionPool(
ConnectionPool(
maxIdleConnections,
keepAliveDuration.toNanos(),
TimeUnit.NANOSECONDS,
)
)
} else {
check((maxIdleConnections != null) == (keepAliveDuration != null)) {
"Both or none of `maxIdleConnections` and `keepAliveDuration` must be set, but only one was set"
}
}

val sslSocketFactory = sslSocketFactory
val trustManager = trustManager
if (sslSocketFactory != null && trustManager != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class OrbOkHttpClient private constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
private var dispatcherExecutorService: ExecutorService? = null
private var proxy: Proxy? = null
private var maxIdleConnections: Int? = null
private var keepAliveDuration: Duration? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
private var hostnameVerifier: HostnameVerifier? = null
Expand Down Expand Up @@ -77,6 +79,46 @@ class OrbOkHttpClient private constructor() {
/** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */
fun proxy(proxy: Optional<Proxy>) = proxy(proxy.getOrNull())

/**
* The maximum number of idle connections kept by the underlying OkHttp connection pool.
*
* If this is set, then [keepAliveDuration] must also be set.
*
* If unset, then OkHttp's default is used.
*/
fun maxIdleConnections(maxIdleConnections: Int?) = apply {
this.maxIdleConnections = maxIdleConnections
}

/**
* Alias for [Builder.maxIdleConnections].
*
* This unboxed primitive overload exists for backwards compatibility.
*/
fun maxIdleConnections(maxIdleConnections: Int) =
maxIdleConnections(maxIdleConnections as Int?)

/**
* Alias for calling [Builder.maxIdleConnections] with `maxIdleConnections.orElse(null)`.
*/
fun maxIdleConnections(maxIdleConnections: Optional<Int>) =
maxIdleConnections(maxIdleConnections.getOrNull())

/**
* The keep-alive duration for idle connections in the underlying OkHttp connection pool.
*
* If this is set, then [maxIdleConnections] must also be set.
*
* If unset, then OkHttp's default is used.
*/
fun keepAliveDuration(keepAliveDuration: Duration?) = apply {
this.keepAliveDuration = keepAliveDuration
}

/** Alias for calling [Builder.keepAliveDuration] with `keepAliveDuration.orElse(null)`. */
fun keepAliveDuration(keepAliveDuration: Optional<Duration>) =
keepAliveDuration(keepAliveDuration.getOrNull())

/**
* The socket factory used to secure HTTPS connections.
*
Expand Down Expand Up @@ -338,6 +380,8 @@ class OrbOkHttpClient private constructor() {
OkHttpClient.builder()
.timeout(clientOptions.timeout())
.proxy(proxy)
.maxIdleConnections(maxIdleConnections)
.keepAliveDuration(keepAliveDuration)
.dispatcherExecutorService(dispatcherExecutorService)
.sslSocketFactory(sslSocketFactory)
.trustManager(trustManager)
Expand Down
Loading
Loading