Skip to content

Commit 93530ec

Browse files
committed
## Java SDK Changes Detected:
* `airbyte.destinations.patchDestination()`: * `request.destinationPatchRequest.configuration` **Changed** **Breaking** ⚠️ * `response.configuration` **Changed** **Breaking** ⚠️ * `airbyte.sources.createSource()`: * `request.configuration` **Changed** **Breaking** ⚠️ * `response.configuration` **Changed** **Breaking** ⚠️ * `airbyte.connections.getConnection()`: `response` **Changed** **Breaking** ⚠️ * `airbyte.connections.listConnections()`: `response.data.[]` **Changed** **Breaking** ⚠️ * `airbyte.connections.patchConnection()`: * `request.connectionPatchRequest.configurations.streams.[]` **Changed** * `response` **Changed** **Breaking** ⚠️ * `airbyte.destinations.createDestination()`: * `request.configuration` **Changed** **Breaking** ⚠️ * `response.configuration` **Changed** **Breaking** ⚠️ * `airbyte.destinations.getDestination()`: `response.configuration` **Changed** **Breaking** ⚠️ * `airbyte.destinations.listDestinations()`: `response.data.[].configuration` **Changed** **Breaking** ⚠️ * `airbyte.connections.createConnection()`: * `request.configurations.streams.[]` **Changed** * `response` **Changed** **Breaking** ⚠️ * `airbyte.declarativeSourceDefinitions.updateDeclarativeSourceDefinition()`: * `request.updateDeclarativeSourceDefinitionRequest.version` **Removed** **Breaking** ⚠️ * `airbyte.destinations.putDestination()`: * `request.destinationPutRequest.configuration` **Changed** **Breaking** ⚠️ * `response.configuration` **Changed** **Breaking** ⚠️ * `airbyte.sources.getSource()`: `response.configuration` **Changed** **Breaking** ⚠️ * `airbyte.sources.listSources()`: `response.data.[].configuration` **Changed** **Breaking** ⚠️ * `airbyte.sources.patchSource()`: * `request.sourcePatchRequest.configuration` **Changed** **Breaking** ⚠️ * `response.configuration` **Changed** **Breaking** ⚠️ * `airbyte.sources.putSource()`: * `request.sourcePutRequest.configuration` **Changed** **Breaking** ⚠️ * `response.configuration` **Changed** **Breaking** ⚠️ * `airbyte.workspaces.createOrUpdateWorkspaceOAuthCredentials()`: * `request.workspaceOAuthCredentialsRequest.configuration` **Changed** **Breaking** ⚠️ * `airbyte.streams.getStreamProperties()`: `response.[].streamnamespace` **Added** * `airbyte.organizations.createOrUpdateOrganizationOAuthCredentials()`: **Added**
1 parent 04b5134 commit 93530ec

File tree

3,718 files changed

+123059
-50394
lines changed

Some content is hidden

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

3,718 files changed

+123059
-50394
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
**/.speakeasy/temp/
2+
**/.speakeasy/logs/
3+
.env
4+
.env.local
15
.speakeasy/reports
26
# Ignore IDE-specific configs
37
.project

.speakeasy/gen.lock

Lines changed: 611 additions & 138 deletions
Large diffs are not rendered by default.

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
speakeasyVersion: 1.533.0
1+
speakeasyVersion: 1.635.1
22
sources:
33
my-source:
44
sourceNamespace: my-source
@@ -9,11 +9,11 @@ sources:
99
- main
1010
sample-source:
1111
sourceNamespace: my-source
12-
sourceRevisionDigest: sha256:5c4ac3b133a9b0d18d00a131ead78279d8d36a49e31f5f562d1a200fa11caec3
13-
sourceBlobDigest: sha256:7866415b04810057478603476c27c4042cd2561a5f539d7181e4d5eac8ffca0a
12+
sourceRevisionDigest: sha256:59e327c0737e7d230fe332ba797a171c1182b070b8fc74b0c8c0ea0d983ee675
13+
sourceBlobDigest: sha256:5cf719b972274960feef188322a27cea9e780a7ab41144d694f89d150472cf2a
1414
tags:
1515
- latest
16-
- speakeasy-sdk-regen-1733962674
16+
- speakeasy-sdk-regen-1758759470
1717
- 1.0.0
1818
targets:
1919
airbyte-api:
@@ -24,10 +24,10 @@ targets:
2424
testing:
2525
source: sample-source
2626
sourceNamespace: my-source
27-
sourceRevisionDigest: sha256:5c4ac3b133a9b0d18d00a131ead78279d8d36a49e31f5f562d1a200fa11caec3
28-
sourceBlobDigest: sha256:7866415b04810057478603476c27c4042cd2561a5f539d7181e4d5eac8ffca0a
27+
sourceRevisionDigest: sha256:59e327c0737e7d230fe332ba797a171c1182b070b8fc74b0c8c0ea0d983ee675
28+
sourceBlobDigest: sha256:5cf719b972274960feef188322a27cea9e780a7ab41144d694f89d150472cf2a
2929
codeSamplesNamespace: my-source-java-code-samples
30-
codeSamplesRevisionDigest: sha256:b4a63e27822e0b961739d46a6b15049756d339c93f1008fae50a8052afce6cd9
30+
codeSamplesRevisionDigest: sha256:21370bdb8d7c9be76a1be6e292dce05e6716761867e6d3d6fd270126d2a06592
3131
workflow:
3232
workflowVersion: 1.0.0
3333
speakeasyVersion: latest

README.md

Lines changed: 152 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ airbyte-api: Programmatically control Airbyte Cloud, OSS & Enterprise.
2121
* [public-api](#public-api)
2222
* [SDK Installation](#sdk-installation)
2323
* [SDK Example Usage](#sdk-example-usage)
24+
* [Asynchronous Support](#asynchronous-support)
2425
* [Authentication](#authentication)
2526
* [Available Resources and Operations](#available-resources-and-operations)
2627
* [Error Handling](#error-handling)
2728
* [Server Selection](#server-selection)
29+
* [Debugging](#debugging)
2830
* [Development](#development)
2931
* [Maturity](#maturity)
3032
* [Contributions](#contributions)
@@ -42,15 +44,15 @@ The samples below show how a published SDK artifact is used:
4244

4345
Gradle:
4446
```groovy
45-
implementation 'com.airbyte:api:2.0.0'
47+
implementation 'com.airbyte:api:2.1.0'
4648
```
4749

4850
Maven:
4951
```xml
5052
<dependency>
5153
<groupId>com.airbyte</groupId>
5254
<artifactId>api</artifactId>
53-
<version>2.0.0</version>
55+
<version>2.1.0</version>
5456
</dependency>
5557
```
5658

@@ -67,29 +69,6 @@ On Windows:
6769
```bash
6870
gradlew.bat publishToMavenLocal -Pskip.signing
6971
```
70-
71-
### Logging
72-
A logging framework/facade has not yet been adopted but is under consideration.
73-
74-
For request and response logging (especially json bodies) use:
75-
```java
76-
SpeakeasyHTTPClient.setDebugLogging(true); // experimental API only (may change without warning)
77-
```
78-
Example output:
79-
```
80-
Sending request: http://localhost:35123/bearer#global GET
81-
Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]}
82-
Received response: (GET http://localhost:35123/bearer#global) 200
83-
Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]}
84-
Response body:
85-
{
86-
"authenticated": true,
87-
"token": "global"
88-
}
89-
```
90-
WARNING: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. <i>Authorization</i> headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`.
91-
92-
Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
9372
<!-- End SDK Installation [installation] -->
9473

9574
<!-- Start SDK Example Usage [usage] -->
@@ -122,6 +101,7 @@ public class Application {
122101
.destinationId("e478de0d-a3a0-475c-b019-25f7dd29e281")
123102
.sourceId("95e66a59-8045-4307-9678-63bc3c9b8c93")
124103
.name("Postgres-to-Bigquery")
104+
.namespaceFormat("${SOURCE_NAMESPACE}")
125105
.build();
126106

127107
CreateConnectionResponse res = sdk.connections().createConnection()
@@ -134,8 +114,120 @@ public class Application {
134114
}
135115
}
136116
```
117+
#### Asynchronous Call
118+
An asynchronous SDK client is also available that returns a [`CompletableFuture<T>`][comp-fut]. See [Asynchronous Support](#asynchronous-support) for more details on async benefits and reactive library integration.
119+
```java
120+
package hello.world;
121+
122+
import com.airbyte.api.Airbyte;
123+
import com.airbyte.api.AsyncAirbyte;
124+
import com.airbyte.api.models.operations.async.CreateConnectionResponse;
125+
import com.airbyte.api.models.shared.*;
126+
import java.util.concurrent.CompletableFuture;
127+
128+
public class Application {
129+
130+
public static void main(String[] args) {
131+
132+
AsyncAirbyte sdk = Airbyte.builder()
133+
.security(Security.builder()
134+
.basicAuth(SchemeBasicAuth.builder()
135+
.password("")
136+
.username("")
137+
.build())
138+
.build())
139+
.build()
140+
.async();
141+
142+
ConnectionCreateRequest req = ConnectionCreateRequest.builder()
143+
.destinationId("e478de0d-a3a0-475c-b019-25f7dd29e281")
144+
.sourceId("95e66a59-8045-4307-9678-63bc3c9b8c93")
145+
.name("Postgres-to-Bigquery")
146+
.namespaceFormat("${SOURCE_NAMESPACE}")
147+
.build();
148+
149+
CompletableFuture<CreateConnectionResponse> resFut = sdk.connections().createConnection()
150+
.request(req)
151+
.call();
152+
153+
resFut.thenAccept(res -> {
154+
if (res.connectionResponse().isPresent()) {
155+
// handle response
156+
}
157+
});
158+
}
159+
}
160+
```
161+
162+
[comp-fut]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
137163
<!-- End SDK Example Usage [usage] -->
138164

165+
<!-- Start Asynchronous Support [async-support] -->
166+
## Asynchronous Support
167+
168+
The SDK provides comprehensive asynchronous support using Java's [`CompletableFuture<T>`][comp-fut] and [Reactive Streams `Publisher<T>`][reactive-streams] APIs. This design makes no assumptions about your choice of reactive toolkit, allowing seamless integration with any reactive library.
169+
170+
<details>
171+
<summary>Why Use Async?</summary>
172+
173+
Asynchronous operations provide several key benefits:
174+
175+
- **Non-blocking I/O**: Your threads stay free for other work while operations are in flight
176+
- **Better resource utilization**: Handle more concurrent operations with fewer threads
177+
- **Improved scalability**: Build highly responsive applications that can handle thousands of concurrent requests
178+
- **Reactive integration**: Works seamlessly with reactive streams and backpressure handling
179+
180+
</details>
181+
182+
<details>
183+
<summary>Reactive Library Integration</summary>
184+
185+
The SDK returns [Reactive Streams `Publisher<T>`][reactive-streams] instances for operations dealing with streams involving multiple I/O interactions. We use Reactive Streams instead of JDK Flow API to provide broader compatibility with the reactive ecosystem, as most reactive libraries natively support Reactive Streams.
186+
187+
**Why Reactive Streams over JDK Flow?**
188+
- **Broader ecosystem compatibility**: Most reactive libraries (Project Reactor, RxJava, Akka Streams, etc.) natively support Reactive Streams
189+
- **Industry standard**: Reactive Streams is the de facto standard for reactive programming in Java
190+
- **Better interoperability**: Seamless integration without additional adapters for most use cases
191+
192+
**Integration with Popular Libraries:**
193+
- **Project Reactor**: Use `Flux.from(publisher)` to convert to Reactor types
194+
- **RxJava**: Use `Flowable.fromPublisher(publisher)` for RxJava integration
195+
- **Akka Streams**: Use `Source.fromPublisher(publisher)` for Akka Streams integration
196+
- **Vert.x**: Use `ReadStream.fromPublisher(vertx, publisher)` for Vert.x reactive streams
197+
- **Mutiny**: Use `Multi.createFrom().publisher(publisher)` for Quarkus Mutiny integration
198+
199+
**For JDK Flow API Integration:**
200+
If you need JDK Flow API compatibility (e.g., for Quarkus/Mutiny 2), you can use adapters:
201+
```java
202+
// Convert Reactive Streams Publisher to Flow Publisher
203+
Flow.Publisher<T> flowPublisher = FlowAdapters.toFlowPublisher(reactiveStreamsPublisher);
204+
205+
// Convert Flow Publisher to Reactive Streams Publisher
206+
Publisher<T> reactiveStreamsPublisher = FlowAdapters.toPublisher(flowPublisher);
207+
```
208+
209+
For standard single-response operations, the SDK returns `CompletableFuture<T>` for straightforward async execution.
210+
211+
</details>
212+
213+
<details>
214+
<summary>Supported Operations</summary>
215+
216+
Async support is available for:
217+
218+
- **[Server-sent Events](#server-sent-event-streaming)**: Stream real-time events with Reactive Streams `Publisher<T>`
219+
- **[JSONL Streaming](#jsonl-streaming)**: Process streaming JSON lines asynchronously
220+
- **[Pagination](#pagination)**: Iterate through paginated results using `callAsPublisher()` and `callAsPublisherUnwrapped()`
221+
- **[File Uploads](#file-uploads)**: Upload files asynchronously with progress tracking
222+
- **[File Downloads](#file-downloads)**: Download files asynchronously with streaming support
223+
- **[Standard Operations](#example)**: All regular API calls return `CompletableFuture<T>` for async execution
224+
225+
</details>
226+
227+
[comp-fut]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
228+
[reactive-streams]: https://www.reactive-streams.org/
229+
<!-- End Asynchronous Support [async-support] -->
230+
139231
<!-- Start Authentication [security] -->
140232
## Authentication
141233

@@ -175,6 +267,7 @@ public class Application {
175267
.destinationId("e478de0d-a3a0-475c-b019-25f7dd29e281")
176268
.sourceId("95e66a59-8045-4307-9678-63bc3c9b8c93")
177269
.name("Postgres-to-Bigquery")
270+
.namespaceFormat("${SOURCE_NAMESPACE}")
178271
.build();
179272

180273
CreateConnectionResponse res = sdk.connections().createConnection()
@@ -242,6 +335,7 @@ public class Application {
242335

243336
### [organizations()](docs/sdks/organizations/README.md)
244337

338+
* [createOrUpdateOrganizationOAuthCredentials](docs/sdks/organizations/README.md#createorupdateorganizationoauthcredentials) - Create OAuth override credentials for an organization and source type.
245339
* [listOrganizationsForUser](docs/sdks/organizations/README.md#listorganizationsforuser) - List all organizations for a user
246340

247341
### [permissions()](docs/sdks/permissions/README.md)
@@ -336,6 +430,7 @@ public class Application {
336430
.destinationId("e478de0d-a3a0-475c-b019-25f7dd29e281")
337431
.sourceId("95e66a59-8045-4307-9678-63bc3c9b8c93")
338432
.name("Postgres-to-Bigquery")
433+
.namespaceFormat("${SOURCE_NAMESPACE}")
339434
.build();
340435

341436
CreateConnectionResponse res = sdk.connections().createConnection()
@@ -382,6 +477,7 @@ public class Application {
382477
.destinationId("e478de0d-a3a0-475c-b019-25f7dd29e281")
383478
.sourceId("95e66a59-8045-4307-9678-63bc3c9b8c93")
384479
.name("Postgres-to-Bigquery")
480+
.namespaceFormat("${SOURCE_NAMESPACE}")
385481
.build();
386482

387483
CreateConnectionResponse res = sdk.connections().createConnection()
@@ -396,6 +492,37 @@ public class Application {
396492
```
397493
<!-- End Server Selection [server] -->
398494

495+
<!-- Start Debugging [debug] -->
496+
## Debugging
497+
498+
### Debug
499+
You can setup your SDK to emit debug logs for SDK requests and responses.
500+
501+
For request and response logging (especially json bodies), call `enableHTTPDebugLogging(boolean)` on the SDK builder like so:
502+
```java
503+
SDK.builder()
504+
.enableHTTPDebugLogging(true)
505+
.build();
506+
```
507+
Example output:
508+
```
509+
Sending request: http://localhost:35123/bearer#global GET
510+
Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]}
511+
Received response: (GET http://localhost:35123/bearer#global) 200
512+
Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]}
513+
Response body:
514+
{
515+
"authenticated": true,
516+
"token": "global"
517+
}
518+
```
519+
__WARNING__: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. <i>Authorization</i> headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`.
520+
521+
__NOTE__: This is a convenience method that calls `HTTPClient.enableDebugLogging()`. The `SpeakeasyHTTPClient` honors this setting. If you are using a custom HTTP client, it is up to the custom client to honor this setting.
522+
523+
Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
524+
<!-- End Debugging [debug] -->
525+
399526
<!-- Placeholder for Future Speakeasy SDK Sections -->
400527

401528
# Development

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,4 +1201,14 @@ Based on:
12011201
### Generated
12021202
- [java v2.0.0] .
12031203
### Releases
1204-
- [Maven Central v2.0.0] https://central.sonatype.com/artifact/com.airbyte/api/2.0.0 - .
1204+
- [Maven Central v2.0.0] https://central.sonatype.com/artifact/com.airbyte/api/2.0.0 - .
1205+
1206+
## 2025-10-07 00:17:54
1207+
### Changes
1208+
Based on:
1209+
- OpenAPI Doc
1210+
- Speakeasy CLI 1.635.1 (2.722.2) https://github.com/speakeasy-api/speakeasy
1211+
### Generated
1212+
- [java v2.1.0] .
1213+
### Releases
1214+
- [Maven Central v2.1.0] https://central.sonatype.com/artifact/com.airbyte/api/2.1.0 - .

USAGE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class Application {
2424
.destinationId("e478de0d-a3a0-475c-b019-25f7dd29e281")
2525
.sourceId("95e66a59-8045-4307-9678-63bc3c9b8c93")
2626
.name("Postgres-to-Bigquery")
27+
.namespaceFormat("${SOURCE_NAMESPACE}")
2728
.build();
2829

2930
CreateConnectionResponse res = sdk.connections().createConnection()

0 commit comments

Comments
 (0)