Skip to content

Commit f1f7a00

Browse files
Merge pull request #309 from OneBusAway/release-please--branches--main--changes--next
release: 0.1.0-alpha.68
2 parents c1e93e2 + 77d55fe commit f1f7a00

File tree

12 files changed

+76
-48
lines changed

12 files changed

+76
-48
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.prism.log
22
.gradle
33
.idea
4+
.kotlin
45
build
56
codegen.log
67
kls_database.db

.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.67"
2+
".": "0.1.0-alpha.68"
33
}

CHANGELOG.md

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

3+
## 0.1.0-alpha.68 (2025-05-15)
4+
5+
Full Changelog: [v0.1.0-alpha.67...v0.1.0-alpha.68](https://github.com/OneBusAway/kotlin-sdk/compare/v0.1.0-alpha.67...v0.1.0-alpha.68)
6+
7+
### Chores
8+
9+
* **internal:** add `.kotlin` to `.gitignore` ([#276](https://github.com/OneBusAway/kotlin-sdk/issues/276)) ([1eb24ad](https://github.com/OneBusAway/kotlin-sdk/commit/1eb24ad47b637a551e3bfe075e8146c707c60019))
10+
* **internal:** codegen related update ([#277](https://github.com/OneBusAway/kotlin-sdk/issues/277)) ([df01249](https://github.com/OneBusAway/kotlin-sdk/commit/df01249a07ee2d58d49e3328dfe024ae5074773a))
11+
12+
13+
### Documentation
14+
15+
* document `JsonValue` construction in readme ([#279](https://github.com/OneBusAway/kotlin-sdk/issues/279)) ([d093175](https://github.com/OneBusAway/kotlin-sdk/commit/d093175f95faf5270b78715ecfe863cfbd665ac7))
16+
* revise readme docs about nested params ([#278](https://github.com/OneBusAway/kotlin-sdk/issues/278)) ([0d9b03e](https://github.com/OneBusAway/kotlin-sdk/commit/0d9b03e374779e83a960842653f4e75734736d23))
17+
318
## 0.1.0-alpha.67 (2025-05-15)
419

520
Full Changelog: [v0.1.0-alpha.66...v0.1.0-alpha.67](https://github.com/OneBusAway/kotlin-sdk/compare/v0.1.0-alpha.66...v0.1.0-alpha.67)

README.md

Lines changed: 41 additions & 6 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-kotlin)](https://central.sonatype.com/artifact/org.onebusaway/onebusaway-sdk-kotlin/0.1.0-alpha.67)
6-
[![javadoc](https://javadoc.io/badge2/org.onebusaway/onebusaway-sdk-kotlin/0.1.0-alpha.67/javadoc.svg)](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-kotlin/0.1.0-alpha.67)
5+
[![Maven Central](https://img.shields.io/maven-central/v/org.onebusaway/onebusaway-sdk-kotlin)](https://central.sonatype.com/artifact/org.onebusaway/onebusaway-sdk-kotlin/0.1.0-alpha.68)
6+
[![javadoc](https://javadoc.io/badge2/org.onebusaway/onebusaway-sdk-kotlin/0.1.0-alpha.68/javadoc.svg)](https://javadoc.io/doc/org.onebusaway/onebusaway-sdk-kotlin/0.1.0-alpha.68)
77

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

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

2424
```kotlin
25-
implementation("org.onebusaway:onebusaway-sdk-kotlin:0.1.0-alpha.67")
25+
implementation("org.onebusaway:onebusaway-sdk-kotlin:0.1.0-alpha.68")
2626
```
2727

2828
### Maven
@@ -31,7 +31,7 @@ implementation("org.onebusaway:onebusaway-sdk-kotlin:0.1.0-alpha.67")
3131
<dependency>
3232
<groupId>org.onebusaway</groupId>
3333
<artifactId>onebusaway-sdk-kotlin</artifactId>
34-
<version>0.1.0-alpha.67</version>
34+
<version>0.1.0-alpha.68</version>
3535
</dependency>
3636
```
3737

@@ -305,16 +305,51 @@ val params: CurrentTimeRetrieveParams = CurrentTimeRetrieveParams.builder()
305305
.build()
306306
```
307307

308-
These can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods. You can also set undocumented parameters on nested headers, query params, or body classes using the `putAdditionalProperty` method. These properties can be accessed on the built object later using the `_additionalProperties()` method.
308+
These can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.
309309

310-
To set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/core/JsonValue.kt) object to its setter:
310+
To set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/core/Values.kt) object to its setter:
311311

312312
```kotlin
313313
import org.onebusaway.models.CurrentTimeRetrieveParams
314314

315315
val params: CurrentTimeRetrieveParams = CurrentTimeRetrieveParams.builder().build()
316316
```
317317

318+
The most straightforward way to create a [`JsonValue`](onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/core/Values.kt) is using its `from(...)` method:
319+
320+
```kotlin
321+
import org.onebusaway.core.JsonValue
322+
323+
// Create primitive JSON values
324+
val nullValue: JsonValue = JsonValue.from(null)
325+
val booleanValue: JsonValue = JsonValue.from(true)
326+
val numberValue: JsonValue = JsonValue.from(42)
327+
val stringValue: JsonValue = JsonValue.from("Hello World!")
328+
329+
// Create a JSON array value equivalent to `["Hello", "World"]`
330+
val arrayValue: JsonValue = JsonValue.from(listOf(
331+
"Hello", "World"
332+
))
333+
334+
// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`
335+
val objectValue: JsonValue = JsonValue.from(mapOf(
336+
"a" to 1, "b" to 2
337+
))
338+
339+
// Create an arbitrarily nested JSON equivalent to:
340+
// {
341+
// "a": [1, 2],
342+
// "b": [3, 4]
343+
// }
344+
val complexValue: JsonValue = JsonValue.from(mapOf(
345+
"a" to listOf(
346+
1, 2
347+
), "b" to listOf(
348+
3, 4
349+
)
350+
))
351+
```
352+
318353
### Response properties
319354

320355
To access undocumented response properties, call the `_additionalProperties()` method:

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.67" // x-release-please-version
11+
version = "0.1.0-alpha.68" // x-release-please-version
1212
}
1313

1414
subprojects {

buildSrc/src/main/kotlin/onebusaway-sdk.kotlin.gradle.kts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ configure<SpotlessExtension> {
2222

2323
tasks.withType<KotlinCompile>().configureEach {
2424
compilerOptions {
25+
allWarningsAsErrors = true
2526
freeCompilerArgs = listOf(
26-
"-Xjvm-default=all",
27-
"-Xjdk-release=1.8",
28-
// Suppress deprecation warnings because we may still reference and test deprecated members.
29-
"-Xsuppress-warning=DEPRECATION"
27+
"-Xjvm-default=all",
28+
"-Xjdk-release=1.8",
29+
// Suppress deprecation warnings because we may still reference and test deprecated members.
30+
"-Xsuppress-warning=DEPRECATION"
3031
)
3132
jvmTarget.set(JvmTarget.JVM_1_8)
3233
}

onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/services/async/AgenciesWithCoverageServiceAsync.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ interface AgenciesWithCoverageServiceAsync {
2424
requestOptions: RequestOptions = RequestOptions.none(),
2525
): AgenciesWithCoverageListResponse
2626

27-
/**
28-
* Returns a list of all transit agencies currently supported by OneBusAway along with the
29-
* center of their coverage area.
30-
*/
27+
/** @see [list] */
3128
suspend fun list(requestOptions: RequestOptions): AgenciesWithCoverageListResponse =
3229
list(AgenciesWithCoverageListParams.none(), requestOptions)
3330

@@ -47,10 +44,7 @@ interface AgenciesWithCoverageServiceAsync {
4744
requestOptions: RequestOptions = RequestOptions.none(),
4845
): HttpResponseFor<AgenciesWithCoverageListResponse>
4946

50-
/**
51-
* Returns a raw HTTP response for `get /api/where/agencies-with-coverage.json`, but is
52-
* otherwise the same as [AgenciesWithCoverageServiceAsync.list].
53-
*/
47+
/** @see [list] */
5448
@MustBeClosed
5549
suspend fun list(
5650
requestOptions: RequestOptions

onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/services/async/ConfigServiceAsync.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface ConfigServiceAsync {
2121
requestOptions: RequestOptions = RequestOptions.none(),
2222
): ConfigRetrieveResponse
2323

24-
/** config */
24+
/** @see [retrieve] */
2525
suspend fun retrieve(requestOptions: RequestOptions): ConfigRetrieveResponse =
2626
retrieve(ConfigRetrieveParams.none(), requestOptions)
2727

@@ -40,10 +40,7 @@ interface ConfigServiceAsync {
4040
requestOptions: RequestOptions = RequestOptions.none(),
4141
): HttpResponseFor<ConfigRetrieveResponse>
4242

43-
/**
44-
* Returns a raw HTTP response for `get /api/where/config.json`, but is otherwise the same
45-
* as [ConfigServiceAsync.retrieve].
46-
*/
43+
/** @see [retrieve] */
4744
@MustBeClosed
4845
suspend fun retrieve(
4946
requestOptions: RequestOptions

onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/services/async/CurrentTimeServiceAsync.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface CurrentTimeServiceAsync {
2121
requestOptions: RequestOptions = RequestOptions.none(),
2222
): CurrentTimeRetrieveResponse
2323

24-
/** current-time */
24+
/** @see [retrieve] */
2525
suspend fun retrieve(requestOptions: RequestOptions): CurrentTimeRetrieveResponse =
2626
retrieve(CurrentTimeRetrieveParams.none(), requestOptions)
2727

@@ -41,10 +41,7 @@ interface CurrentTimeServiceAsync {
4141
requestOptions: RequestOptions = RequestOptions.none(),
4242
): HttpResponseFor<CurrentTimeRetrieveResponse>
4343

44-
/**
45-
* Returns a raw HTTP response for `get /api/where/current-time.json`, but is otherwise the
46-
* same as [CurrentTimeServiceAsync.retrieve].
47-
*/
44+
/** @see [retrieve] */
4845
@MustBeClosed
4946
suspend fun retrieve(
5047
requestOptions: RequestOptions

onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/services/blocking/AgenciesWithCoverageService.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ interface AgenciesWithCoverageService {
2424
requestOptions: RequestOptions = RequestOptions.none(),
2525
): AgenciesWithCoverageListResponse
2626

27-
/**
28-
* Returns a list of all transit agencies currently supported by OneBusAway along with the
29-
* center of their coverage area.
30-
*/
27+
/** @see [list] */
3128
fun list(requestOptions: RequestOptions): AgenciesWithCoverageListResponse =
3229
list(AgenciesWithCoverageListParams.none(), requestOptions)
3330

@@ -47,10 +44,7 @@ interface AgenciesWithCoverageService {
4744
requestOptions: RequestOptions = RequestOptions.none(),
4845
): HttpResponseFor<AgenciesWithCoverageListResponse>
4946

50-
/**
51-
* Returns a raw HTTP response for `get /api/where/agencies-with-coverage.json`, but is
52-
* otherwise the same as [AgenciesWithCoverageService.list].
53-
*/
47+
/** @see [list] */
5448
@MustBeClosed
5549
fun list(
5650
requestOptions: RequestOptions

0 commit comments

Comments
 (0)