Skip to content

Commit 2684e07

Browse files
Merge pull request #87 from OneBusAway/release-please--branches--main--changes--next
release: 0.1.0-alpha.31
2 parents 7235396 + e55de6e commit 2684e07

File tree

92 files changed

+790
-484
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+790
-484
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.30"
2+
".": "0.1.0-alpha.31"
33
}

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 0.1.0-alpha.31 (2025-07-25)
4+
5+
Full Changelog: [v0.1.0-alpha.30...v0.1.0-alpha.31](https://github.com/OneBusAway/java-sdk/compare/v0.1.0-alpha.30...v0.1.0-alpha.31)
6+
7+
### Chores
8+
9+
* **internal:** remove unnecessary `[...]` in `[@see](https://github.com/see)` ([bb19ff1](https://github.com/OneBusAway/java-sdk/commit/bb19ff1cd43642f3023f3e521509c424142e9f36))
10+
11+
12+
### Documentation
13+
14+
* more code comments ([07cd62d](https://github.com/OneBusAway/java-sdk/commit/07cd62d5e4d6479f61961f0e75eb3a507fd4516c))
15+
316
## 0.1.0-alpha.30 (2025-07-24)
417

518
Full Changelog: [v0.1.0-alpha.29...v0.1.0-alpha.30](https://github.com/OneBusAway/java-sdk/compare/v0.1.0-alpha.29...v0.1.0-alpha.30)

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

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

5-
[![Maven Central](https://img.shields.io/maven-central/v/org.onebusaway/onebusaway-sdk-java)](https://central.sonatype.com/artifact/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.30)
6-
[![javadoc](https://javadoc.io/badge2/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.30/javadoc.svg)](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.30)
5+
[![Maven Central](https://img.shields.io/maven-central/v/org.onebusaway/onebusaway-sdk-java)](https://central.sonatype.com/artifact/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.31)
6+
[![javadoc](https://javadoc.io/badge2/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.31/javadoc.svg)](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.31)
77

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

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

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

18-
The REST API documentation can be found on [developer.onebusaway.org](https://developer.onebusaway.org). Javadocs are available on [javadoc.io](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.30).
18+
The REST API documentation can be found on [developer.onebusaway.org](https://developer.onebusaway.org). Javadocs are available on [javadoc.io](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.31).
1919

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

@@ -26,7 +26,7 @@ The REST API documentation can be found on [developer.onebusaway.org](https://de
2626
### Gradle
2727

2828
```kotlin
29-
implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.30")
29+
implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.31")
3030
```
3131

3232
### Maven
@@ -35,7 +35,7 @@ implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.30")
3535
<dependency>
3636
<groupId>org.onebusaway</groupId>
3737
<artifactId>onebusaway-sdk-java</artifactId>
38-
<version>0.1.0-alpha.30</version>
38+
<version>0.1.0-alpha.31</version>
3939
</dependency>
4040
```
4141

@@ -256,7 +256,7 @@ If the SDK threw an exception, but you're _certain_ the version is compatible, t
256256

257257
### Retries
258258

259-
The SDK automatically retries 2 times by default, with a short exponential backoff.
259+
The SDK automatically retries 2 times by default, with a short exponential backoff between requests.
260260

261261
Only the following error types are retried:
262262

@@ -266,7 +266,7 @@ Only the following error types are retried:
266266
- 429 Rate Limit
267267
- 5xx Internal
268268

269-
The API may also explicitly instruct the SDK to retry or not retry a response.
269+
The API may also explicitly instruct the SDK to retry or not retry a request.
270270

271271
To set a custom number of retries, configure the client using the `maxRetries` method:
272272

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repositories {
88

99
allprojects {
1010
group = "org.onebusaway"
11-
version = "0.1.0-alpha.30" // x-release-please-version
11+
version = "0.1.0-alpha.31" // x-release-please-version
1212
}
1313

1414
subprojects {

onebusaway-sdk-java-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OnebusawaySdkOkHttpClient.kt

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,26 @@ import org.onebusaway.client.OnebusawaySdkClientImpl
1616
import org.onebusaway.core.ClientOptions
1717
import org.onebusaway.core.Timeout
1818
import org.onebusaway.core.http.Headers
19+
import org.onebusaway.core.http.HttpClient
1920
import org.onebusaway.core.http.QueryParams
2021
import org.onebusaway.core.jsonMapper
2122

23+
/**
24+
* A class that allows building an instance of [OnebusawaySdkClient] with [OkHttpClient] as the
25+
* underlying [HttpClient].
26+
*/
2227
class OnebusawaySdkOkHttpClient private constructor() {
2328

2429
companion object {
2530

26-
/**
27-
* Returns a mutable builder for constructing an instance of [OnebusawaySdkOkHttpClient].
28-
*/
31+
/** Returns a mutable builder for constructing an instance of [OnebusawaySdkClient]. */
2932
@JvmStatic fun builder() = Builder()
3033

34+
/**
35+
* Returns a client configured using system properties and environment variables.
36+
*
37+
* @see ClientOptions.Builder.fromEnv
38+
*/
3139
@JvmStatic fun fromEnv(): OnebusawaySdkClient = builder().fromEnv().build()
3240
}
3341

@@ -104,19 +112,49 @@ class OnebusawaySdkOkHttpClient private constructor() {
104112
clientOptions.checkJacksonVersionCompatibility(checkJacksonVersionCompatibility)
105113
}
106114

115+
/**
116+
* The Jackson JSON mapper to use for serializing and deserializing JSON.
117+
*
118+
* Defaults to [org.onebusaway.core.jsonMapper]. The default is usually sufficient and
119+
* rarely needs to be overridden.
120+
*/
107121
fun jsonMapper(jsonMapper: JsonMapper) = apply { clientOptions.jsonMapper(jsonMapper) }
108122

123+
/**
124+
* The clock to use for operations that require timing, like retries.
125+
*
126+
* This is primarily useful for using a fake clock in tests.
127+
*
128+
* Defaults to [Clock.systemUTC].
129+
*/
109130
fun clock(clock: Clock) = apply { clientOptions.clock(clock) }
110131

132+
/**
133+
* The base URL to use for every request.
134+
*
135+
* Defaults to the production environment: `https://api.pugetsound.onebusaway.org`.
136+
*/
111137
fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) }
112138

113139
/** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */
114140
fun baseUrl(baseUrl: Optional<String>) = baseUrl(baseUrl.getOrNull())
115141

142+
/**
143+
* Whether to call `validate` on every response before returning it.
144+
*
145+
* Defaults to false, which means the shape of the response will not be validated upfront.
146+
* Instead, validation will only occur for the parts of the response that are accessed.
147+
*/
116148
fun responseValidation(responseValidation: Boolean) = apply {
117149
clientOptions.responseValidation(responseValidation)
118150
}
119151

152+
/**
153+
* Sets the maximum time allowed for various parts of an HTTP call's lifecycle, excluding
154+
* retries.
155+
*
156+
* Defaults to [Timeout.default].
157+
*/
120158
fun timeout(timeout: Timeout) = apply { clientOptions.timeout(timeout) }
121159

122160
/**
@@ -128,6 +166,21 @@ class OnebusawaySdkOkHttpClient private constructor() {
128166
*/
129167
fun timeout(timeout: Duration) = apply { clientOptions.timeout(timeout) }
130168

169+
/**
170+
* The maximum number of times to retry failed requests, with a short exponential backoff
171+
* between requests.
172+
*
173+
* Only the following error types are retried:
174+
* - Connection errors (for example, due to a network connectivity problem)
175+
* - 408 Request Timeout
176+
* - 409 Conflict
177+
* - 429 Rate Limit
178+
* - 5xx Internal
179+
*
180+
* The API may also explicitly instruct the SDK to retry or not retry a request.
181+
*
182+
* Defaults to 2.
183+
*/
131184
fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) }
132185

133186
fun apiKey(apiKey: String) = apply { clientOptions.apiKey(apiKey) }
@@ -212,6 +265,11 @@ class OnebusawaySdkOkHttpClient private constructor() {
212265
clientOptions.removeAllQueryParams(keys)
213266
}
214267

268+
/**
269+
* Updates configuration using system properties and environment variables.
270+
*
271+
* @see ClientOptions.Builder.fromEnv
272+
*/
215273
fun fromEnv() = apply { clientOptions.fromEnv() }
216274

217275
/**

onebusaway-sdk-java-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OnebusawaySdkOkHttpClientAsync.kt

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,26 @@ import org.onebusaway.client.OnebusawaySdkClientAsyncImpl
1616
import org.onebusaway.core.ClientOptions
1717
import org.onebusaway.core.Timeout
1818
import org.onebusaway.core.http.Headers
19+
import org.onebusaway.core.http.HttpClient
1920
import org.onebusaway.core.http.QueryParams
2021
import org.onebusaway.core.jsonMapper
2122

23+
/**
24+
* A class that allows building an instance of [OnebusawaySdkClientAsync] with [OkHttpClient] as the
25+
* underlying [HttpClient].
26+
*/
2227
class OnebusawaySdkOkHttpClientAsync private constructor() {
2328

2429
companion object {
2530

26-
/**
27-
* Returns a mutable builder for constructing an instance of
28-
* [OnebusawaySdkOkHttpClientAsync].
29-
*/
31+
/** Returns a mutable builder for constructing an instance of [OnebusawaySdkClientAsync]. */
3032
@JvmStatic fun builder() = Builder()
3133

34+
/**
35+
* Returns a client configured using system properties and environment variables.
36+
*
37+
* @see ClientOptions.Builder.fromEnv
38+
*/
3239
@JvmStatic fun fromEnv(): OnebusawaySdkClientAsync = builder().fromEnv().build()
3340
}
3441

@@ -105,19 +112,49 @@ class OnebusawaySdkOkHttpClientAsync private constructor() {
105112
clientOptions.checkJacksonVersionCompatibility(checkJacksonVersionCompatibility)
106113
}
107114

115+
/**
116+
* The Jackson JSON mapper to use for serializing and deserializing JSON.
117+
*
118+
* Defaults to [org.onebusaway.core.jsonMapper]. The default is usually sufficient and
119+
* rarely needs to be overridden.
120+
*/
108121
fun jsonMapper(jsonMapper: JsonMapper) = apply { clientOptions.jsonMapper(jsonMapper) }
109122

123+
/**
124+
* The clock to use for operations that require timing, like retries.
125+
*
126+
* This is primarily useful for using a fake clock in tests.
127+
*
128+
* Defaults to [Clock.systemUTC].
129+
*/
110130
fun clock(clock: Clock) = apply { clientOptions.clock(clock) }
111131

132+
/**
133+
* The base URL to use for every request.
134+
*
135+
* Defaults to the production environment: `https://api.pugetsound.onebusaway.org`.
136+
*/
112137
fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) }
113138

114139
/** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */
115140
fun baseUrl(baseUrl: Optional<String>) = baseUrl(baseUrl.getOrNull())
116141

142+
/**
143+
* Whether to call `validate` on every response before returning it.
144+
*
145+
* Defaults to false, which means the shape of the response will not be validated upfront.
146+
* Instead, validation will only occur for the parts of the response that are accessed.
147+
*/
117148
fun responseValidation(responseValidation: Boolean) = apply {
118149
clientOptions.responseValidation(responseValidation)
119150
}
120151

152+
/**
153+
* Sets the maximum time allowed for various parts of an HTTP call's lifecycle, excluding
154+
* retries.
155+
*
156+
* Defaults to [Timeout.default].
157+
*/
121158
fun timeout(timeout: Timeout) = apply { clientOptions.timeout(timeout) }
122159

123160
/**
@@ -129,6 +166,21 @@ class OnebusawaySdkOkHttpClientAsync private constructor() {
129166
*/
130167
fun timeout(timeout: Duration) = apply { clientOptions.timeout(timeout) }
131168

169+
/**
170+
* The maximum number of times to retry failed requests, with a short exponential backoff
171+
* between requests.
172+
*
173+
* Only the following error types are retried:
174+
* - Connection errors (for example, due to a network connectivity problem)
175+
* - 408 Request Timeout
176+
* - 409 Conflict
177+
* - 429 Rate Limit
178+
* - 5xx Internal
179+
*
180+
* The API may also explicitly instruct the SDK to retry or not retry a request.
181+
*
182+
* Defaults to 2.
183+
*/
132184
fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) }
133185

134186
fun apiKey(apiKey: String) = apply { clientOptions.apiKey(apiKey) }
@@ -213,6 +265,11 @@ class OnebusawaySdkOkHttpClientAsync private constructor() {
213265
clientOptions.removeAllQueryParams(keys)
214266
}
215267

268+
/**
269+
* Updates configuration using system properties and environment variables.
270+
*
271+
* @see ClientOptions.Builder.fromEnv
272+
*/
216273
fun fromEnv() = apply { clientOptions.fromEnv() }
217274

218275
/**

0 commit comments

Comments
 (0)