You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* explain jackson compat in readme ([a398943](https://github.com/Finch-API/finch-api-kotlin/commit/a3989439c70f8d2fd9b0b627e11ed77f59403243))
22
+
* update documentation links to be more uniform ([362f869](https://github.com/Finch-API/finch-api-kotlin/commit/362f869d455eeebc71b5bf2d772a1a37d1221ce5))
23
+
3
24
## 5.2.0 (2025-04-12)
4
25
5
26
Full Changelog: [v5.1.0...v5.2.0](https://github.com/Finch-API/finch-api-kotlin/compare/v5.1.0...v5.2.0)
@@ -15,7 +15,7 @@ It is generated with [Stainless](https://www.stainless.com/).
15
15
16
16
<!-- x-release-please-start-version -->
17
17
18
-
The REST API documentation can be found on [developer.tryfinch.com](https://developer.tryfinch.com/). KDocs are also available on [javadoc.io](https://javadoc.io/doc/com.tryfinch.api/finch-kotlin/5.2.0).
18
+
The REST API documentation can be found on [developer.tryfinch.com](https://developer.tryfinch.com/). KDocs are available on [javadoc.io](https://javadoc.io/doc/com.tryfinch.api/finch-kotlin/5.3.0).
19
19
20
20
<!-- x-release-please-end -->
21
21
@@ -26,7 +26,7 @@ The REST API documentation can be found on [developer.tryfinch.com](https://deve
@@ -288,6 +288,17 @@ both of which will raise an error if the signature is invalid.
288
288
Note that the "body" parameter must be the raw JSON string sent from the server (do not parse it first).
289
289
The `.unwrap()` method can parse this JSON for you.
290
290
291
+
## Jackson
292
+
293
+
The SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.
294
+
295
+
The SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).
296
+
297
+
If the SDK threw an exception, but you're _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`FinchOkHttpClient`](finch-kotlin-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt) or [`FinchOkHttpClientAsync`](finch-kotlin-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt).
298
+
299
+
> [!CAUTION]
300
+
> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.
301
+
291
302
## Network options
292
303
293
304
### Retries
@@ -365,6 +376,42 @@ val client: FinchClient = FinchOkHttpClient.builder()
365
376
.build()
366
377
```
367
378
379
+
### Custom HTTP client
380
+
381
+
The SDK consists of three artifacts:
382
+
383
+
-`finch-kotlin-core`
384
+
- Contains core SDK logic
385
+
- Does not depend on [OkHttp](https://square.github.io/okhttp)
386
+
- Exposes [`FinchClient`](finch-kotlin-core/src/main/kotlin/com/tryfinch/api/client/FinchClient.kt), [`FinchClientAsync`](finch-kotlin-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsync.kt), [`FinchClientImpl`](finch-kotlin-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt), and [`FinchClientAsyncImpl`](finch-kotlin-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt), all of which can work with any HTTP client
387
+
-`finch-kotlin-client-okhttp`
388
+
- Depends on [OkHttp](https://square.github.io/okhttp)
389
+
- Exposes [`FinchOkHttpClient`](finch-kotlin-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt) and [`FinchOkHttpClientAsync`](finch-kotlin-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt), which provide a way to construct [`FinchClientImpl`](finch-kotlin-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt) and [`FinchClientAsyncImpl`](finch-kotlin-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt), respectively, using OkHttp
390
+
-`finch-kotlin`
391
+
- Depends on and exposes the APIs of both `finch-kotlin-core` and `finch-kotlin-client-okhttp`
392
+
- Does not have its own logic
393
+
394
+
This structure allows replacing the SDK's default HTTP client without pulling in unnecessary dependencies.
> Try the available [network options](#network-options) before replacing the default client.
400
+
401
+
To use a customized `OkHttpClient`:
402
+
403
+
1. Replace your [`finch-kotlin` dependency](#installation) with `finch-kotlin-core`
404
+
2. Copy `finch-kotlin-client-okhttp`'s [`OkHttpClient`](finch-kotlin-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/OkHttpClient.kt) class into your code and customize it
405
+
3. Construct [`FinchClientImpl`](finch-kotlin-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt) or [`FinchClientAsyncImpl`](finch-kotlin-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt), similarly to [`FinchOkHttpClient`](finch-kotlin-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt) or [`FinchOkHttpClientAsync`](finch-kotlin-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt), using your customized client
406
+
407
+
### Completely custom HTTP client
408
+
409
+
To use a completely custom HTTP client:
410
+
411
+
1. Replace your [`finch-kotlin` dependency](#installation) with `finch-kotlin-core`
412
+
2. Write a class that implements the [`HttpClient`](finch-kotlin-core/src/main/kotlin/com/tryfinch/api/core/http/HttpClient.kt) interface
413
+
3. Construct [`FinchClientImpl`](finch-kotlin-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt) or [`FinchClientAsyncImpl`](finch-kotlin-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt), similarly to [`FinchOkHttpClient`](finch-kotlin-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt) or [`FinchOkHttpClientAsync`](finch-kotlin-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt), using your new client class
414
+
368
415
## Undocumented API functionality
369
416
370
417
The SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.
0 commit comments