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.19.0"
".": "0.20.0"
}
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## 0.20.0 (2025-01-07)

Full Changelog: [v0.19.0...v0.20.0](https://github.com/orbcorp/orb-java/compare/v0.19.0...v0.20.0)

### Features

* **client:** add various convenience setters to models ([#184](https://github.com/orbcorp/orb-java/issues/184)) ([5a7e67f](https://github.com/orbcorp/orb-java/commit/5a7e67f4aff5cd005c04148c72c4f9dbb1f65449))
* **client:** allow setting arbitrary JSON for top-level body params ([5a7e67f](https://github.com/orbcorp/orb-java/commit/5a7e67f4aff5cd005c04148c72c4f9dbb1f65449))
* **client:** expose getters for `JsonField` of body params ([5a7e67f](https://github.com/orbcorp/orb-java/commit/5a7e67f4aff5cd005c04148c72c4f9dbb1f65449))


### Bug Fixes

* **client:** consistently throw on omitting required fields ([5a7e67f](https://github.com/orbcorp/orb-java/commit/5a7e67f4aff5cd005c04148c72c4f9dbb1f65449))
* **client:** convert `JsonField` containing list type to mutable in builder ([5a7e67f](https://github.com/orbcorp/orb-java/commit/5a7e67f4aff5cd005c04148c72c4f9dbb1f65449))


### Documentation

* add params class javadocs ([#182](https://github.com/orbcorp/orb-java/issues/182)) ([e98658d](https://github.com/orbcorp/orb-java/commit/e98658d54e9ef45334ae98fe2901a2db1574a900))


### Styles

* **internal:** explicitly add some method return types ([5a7e67f](https://github.com/orbcorp/orb-java/commit/5a7e67f4aff5cd005c04148c72c4f9dbb1f65449))
* **internal:** move headers and query params setters below others ([5a7e67f](https://github.com/orbcorp/orb-java/commit/5a7e67f4aff5cd005c04148c72c4f9dbb1f65449))
* **internal:** simplify existing convenience setters on params ([5a7e67f](https://github.com/orbcorp/orb-java/commit/5a7e67f4aff5cd005c04148c72c4f9dbb1f65449))

## 0.19.0 (2025-01-06)

Full Changelog: [v0.18.0...v0.19.0](https://github.com/orbcorp/orb-java/compare/v0.18.0...v0.19.0)
Expand Down
6 changes: 3 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/0.19.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/0.20.0)

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

Expand All @@ -25,7 +25,7 @@ The REST API documentation can be found on [docs.withorb.com](https://docs.with
<!-- x-release-please-start-version -->

```kotlin
implementation("com.withorb.api:orb-java:0.19.0")
implementation("com.withorb.api:orb-java:0.20.0")
```

#### Maven
Expand All @@ -34,7 +34,7 @@ implementation("com.withorb.api:orb-java:0.19.0")
<dependency>
<groupId>com.withorb.api</groupId>
<artifactId>orb-java</artifactId>
<version>0.19.0</version>
<version>0.20.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 @@ -4,7 +4,7 @@ plugins {

allprojects {
group = "com.withorb.api"
version = "0.19.0" // x-release-please-version
version = "0.20.0" // x-release-please-version
}


26 changes: 13 additions & 13 deletions orb-java-core/src/main/kotlin/com/withorb/api/core/ClientOptions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,19 @@ private constructor(

fun baseUrl(baseUrl: String) = apply { this.baseUrl = baseUrl }

fun responseValidation(responseValidation: Boolean) = apply {
this.responseValidation = responseValidation
}

fun maxRetries(maxRetries: Int) = apply { this.maxRetries = maxRetries }

fun apiKey(apiKey: String) = apply { this.apiKey = apiKey }

fun webhookSecret(webhookSecret: String?) = apply { this.webhookSecret = webhookSecret }

fun webhookSecret(webhookSecret: Optional<String>) =
webhookSecret(webhookSecret.orElse(null))

fun headers(headers: Headers) = apply {
this.headers.clear()
putAllHeaders(headers)
Expand Down Expand Up @@ -152,19 +165,6 @@ private constructor(

fun removeAllQueryParams(keys: Set<String>) = apply { queryParams.removeAll(keys) }

fun responseValidation(responseValidation: Boolean) = apply {
this.responseValidation = responseValidation
}

fun maxRetries(maxRetries: Int) = apply { this.maxRetries = maxRetries }

fun apiKey(apiKey: String) = apply { this.apiKey = apiKey }

fun webhookSecret(webhookSecret: String?) = apply { this.webhookSecret = webhookSecret }

fun webhookSecret(webhookSecret: Optional<String>) =
webhookSecret(webhookSecret.orElse(null))

fun fromEnv() = apply {
System.getenv("ORB_API_KEY")?.let { apiKey(it) }
System.getenv("ORB_WEBHOOK_SECRET")?.let { webhookSecret(it) }
Expand Down
Loading
Loading