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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 9 additions & 8 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 38254260-287a-40b6-9ac5-c2fcb654c9cc
management:
docChecksum: 4d3762f1431f5a9416d23130ae5bddef
docVersion: 10.21.15
speakeasyVersion: 1.658.2
generationVersion: 2.755.9
releaseVersion: 0.27.6
configChecksum: 222168d62574e76fde931b16441bb719
docChecksum: fec8c2730e982bf83c3099723c55988d
docVersion: 10.21.16
speakeasyVersion: 1.660.0
generationVersion: 2.760.2
releaseVersion: 0.27.7
configChecksum: e91115f5d020b72fcda97e832283d71c
repoURL: https://github.com/apideck-libraries/sdk-java.git
published: true
features:
Expand All @@ -15,7 +15,7 @@ features:
additionalDependencies: 0.1.0
additionalProperties: 0.0.1
constsAndDefaults: 0.1.1
core: 3.55.2
core: 3.55.3
deprecations: 2.81.1
downloadStreams: 0.1.1
errors: 1.0.0
Expand All @@ -24,7 +24,7 @@ features:
globalSecurityCallbacks: 0.1.0
globalSecurityFlattening: 0.1.0
globalServerURLs: 2.83.0
globals: 2.82.2
globals: 2.82.4
groups: 2.81.3
inputOutputModels: 2.83.0
methodServerURLs: 2.82.1
Expand Down Expand Up @@ -4603,6 +4603,7 @@ generatedFiles:
- src/main/java/com/apideck/unify/utils/SerializedBody.java
- src/main/java/com/apideck/unify/utils/SessionManager.java
- src/main/java/com/apideck/unify/utils/SpeakeasyHTTPClient.java
- src/main/java/com/apideck/unify/utils/SpeakeasyLogger.java
- src/main/java/com/apideck/unify/utils/SpeakeasyMetadata.java
- src/main/java/com/apideck/unify/utils/StreamingParser.java
- src/main/java/com/apideck/unify/utils/TypedObject.java
Expand Down
6 changes: 4 additions & 2 deletions .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ generation:
generateNewTests: false
skipResponseBodyAssertions: false
java:
version: 0.27.6
version: 0.27.7
additionalDependencies: []
additionalPlugins: []
artifactID: unify
Expand All @@ -37,8 +37,8 @@ java:
companyURL: www.apideck.com
defaultErrorName: APIException
enableCustomCodeRegions: false
enableSlf4jLogging: false
enableStreamingUploads: false
enhancedUnionMemberResolution: true
flattenGlobalSecurity: true
generateOptionalUnionAccessors: false
generateSpringBootStarter: true
Expand All @@ -60,6 +60,8 @@ java:
maxMethodParams: 4
nullFriendlyParameters: false
openUnions: true
operationScopedParams: true
outputModelSuffix: output
projectName: Apideck
templateVersion: v2
unionStrategy: populated-fields
16 changes: 8 additions & 8 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.658.2
speakeasyVersion: 1.660.0
sources:
Apideck-OAS:
sourceNamespace: apideck-oas
sourceRevisionDigest: sha256:38731f59ebe557d903d2922559804cbd1fc1708d59db53f824e018b9fdf9975b
sourceBlobDigest: sha256:cd8d4014fea095312cdfd23c454c99a2db4465ddcfcb7123b65095b6da53d2d9
sourceRevisionDigest: sha256:85d0d06301e39146f69bd1c0253a1ca571e16ad9dfb1a38813e8070d58803fc8
sourceBlobDigest: sha256:129482fb20633945aba7ec1c30007ea42ccab0819670f2708ad73ddaf642322a
tags:
- latest
- speakeasy-sdk-regen-1763537230
- 10.21.15
- speakeasy-sdk-regen-1763971802
- 10.21.16
targets:
apideck:
source: Apideck-OAS
sourceNamespace: apideck-oas
sourceRevisionDigest: sha256:38731f59ebe557d903d2922559804cbd1fc1708d59db53f824e018b9fdf9975b
sourceBlobDigest: sha256:cd8d4014fea095312cdfd23c454c99a2db4465ddcfcb7123b65095b6da53d2d9
sourceRevisionDigest: sha256:85d0d06301e39146f69bd1c0253a1ca571e16ad9dfb1a38813e8070d58803fc8
sourceBlobDigest: sha256:129482fb20633945aba7ec1c30007ea42ccab0819670f2708ad73ddaf642322a
codeSamplesNamespace: apideck-oas-java-code-samples
codeSamplesRevisionDigest: sha256:c440332349144fc109ccc3411ae9090ee8cee42d9e519370f2715068950f8d25
codeSamplesRevisionDigest: sha256:44b6bcee4438a411e12563c6961350b0d9bceee632e86a14ce91d2dd140efe20
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ The samples below show how a published SDK artifact is used:

Gradle:
```groovy
implementation 'com.apideck:unify:0.27.6'
implementation 'com.apideck:unify:0.27.7'
```

Maven:
```xml
<dependency>
<groupId>com.apideck</groupId>
<artifactId>unify</artifactId>
<version>0.27.6</version>
<version>0.27.7</version>
</dependency>
```

Expand Down Expand Up @@ -1487,9 +1487,11 @@ public class Application {
## Debugging

### Debug

You can setup your SDK to emit debug logs for SDK requests and responses.

For request and response logging (especially json bodies), call `enableHTTPDebugLogging(boolean)` on the SDK builder like so:

```java
SDK.builder()
.enableHTTPDebugLogging(true)
Expand All @@ -1507,10 +1509,11 @@ Response body:
"token": "global"
}
```
__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`.
__WARNING__: This logging should only be 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`.

__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.


Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
<!-- End Debugging [debug] -->

Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -618,4 +618,14 @@ Based on:
### Generated
- [java v0.27.6] .
### Releases
- [Maven Central v0.27.6] https://central.sonatype.com/artifact/com.apideck/unify/0.27.6 - .
- [Maven Central v0.27.6] https://central.sonatype.com/artifact/com.apideck/unify/0.27.6 - .

## 2025-11-24 08:09:36
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.660.0 (2.760.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.27.7] .
### Releases
- [Maven Central v0.27.7] https://central.sonatype.com/artifact/com.apideck/unify/0.27.7 - .
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
groupId=com.apideck
artifactId=unify
version=0.27.6
version=0.27.7
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public RetryConfig retryConfig(UnifyAutoConfigProperties properties) {
// Default retry config for other strategies
return RetryConfig.builder().build();
}

/**
* Creates a {@code Consumer<String>} bean for HTTP debug logging if none exists.
* This logger is used by the SpeakeasyHTTPClient for debug output when debug logging is enabled.
Expand All @@ -85,7 +84,6 @@ public RetryConfig retryConfig(UnifyAutoConfigProperties properties) {
public Consumer<String> httpLogger() {
return System.out::println;
}

/**
* Creates an HTTPClient bean if none exists.
*
Expand Down Expand Up @@ -207,10 +205,10 @@ public com.apideck.unify.utils.Globals globals(UnifyAutoConfigProperties propert
// Populate globals from properties
UnifyAutoConfigProperties.Globals globalProps = properties.getGlobals();
if (globalProps.getConsumerId() != null) {
globals.putParam("header", "consumerId", globalProps.getConsumerId());
globals.putParam("header", "x-apideck-consumer-id", globalProps.getConsumerId());
}
if (globalProps.getAppId() != null) {
globals.putParam("header", "appId", globalProps.getAppId());
globals.putParam("header", "x-apideck-app-id", globalProps.getAppId());
}

return globals;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/apideck/unify/Apideck.java
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public Builder enableHTTPDebugLogging(boolean enabled) {
* @return The builder instance.
*/
public Builder consumerId(String consumerId) {
this.sdkConfiguration.globals.putParam("header", "consumerId", consumerId);
this.sdkConfiguration.globals.putParam("header", "x-apideck-consumer-id", consumerId);
return this;
}

Expand All @@ -250,7 +250,7 @@ public Builder consumerId(String consumerId) {
* @return The builder instance.
*/
public Builder appId(String appId) {
this.sdkConfiguration.globals.putParam("header", "appId", appId);
this.sdkConfiguration.globals.putParam("header", "x-apideck-app-id", appId);
return this;
}
// Visible for testing, may be accessed via reflection in tests
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/apideck/unify/SDKConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
public class SDKConfiguration {

private static final String LANGUAGE = "java";
public static final String OPENAPI_DOC_VERSION = "10.21.15";
public static final String SDK_VERSION = "0.27.6";
public static final String GEN_VERSION = "2.755.9";
public static final String OPENAPI_DOC_VERSION = "10.21.16";
public static final String SDK_VERSION = "0.27.7";
public static final String GEN_VERSION = "2.760.2";
private static final String BASE_PACKAGE = "com.apideck.unify";
public static final String USER_AGENT =
String.format("speakeasy-sdk/%s %s %s %s %s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.apideck.unify.utils.AsyncRetries;
import com.apideck.unify.utils.BackoffStrategy;
import com.apideck.unify.utils.Blob;
import com.apideck.unify.utils.Globals;
import com.apideck.unify.utils.HTTPClient;
import com.apideck.unify.utils.HTTPRequest;
import com.apideck.unify.utils.Headers;
Expand Down Expand Up @@ -58,6 +59,7 @@ static abstract class Base {
final RetryConfig retryConfig;
final HTTPClient client;
final Headers _headers;
final Globals operationGlobals;

public Base(
SDKConfiguration sdkConfiguration, Optional<Options> options,
Expand All @@ -81,6 +83,11 @@ public Base(
.build())
.build());
this.client = this.sdkConfiguration.client();
this.operationGlobals = new Globals();
this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id")
.ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param));
this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id")
.ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param));
}

Optional<SecuritySource> securitySource() {
Expand Down Expand Up @@ -125,8 +132,8 @@ <T>HttpRequest buildRequest(T request, Class<T> klass) throws Exception {
req.addQueryParams(Utils.getQueryParams(
klass,
request,
this.sdkConfiguration.globals));
req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals));
this.operationGlobals));
req.addHeaders(Utils.getHeadersFromMetadata(request, this.operationGlobals));
Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity());

return req.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.apideck.unify.utils.AsyncRetries;
import com.apideck.unify.utils.BackoffStrategy;
import com.apideck.unify.utils.Blob;
import com.apideck.unify.utils.Globals;
import com.apideck.unify.utils.HTTPClient;
import com.apideck.unify.utils.HTTPRequest;
import com.apideck.unify.utils.Headers;
Expand Down Expand Up @@ -58,6 +59,7 @@ static abstract class Base {
final RetryConfig retryConfig;
final HTTPClient client;
final Headers _headers;
final Globals operationGlobals;

public Base(
SDKConfiguration sdkConfiguration, Optional<Options> options,
Expand All @@ -81,6 +83,11 @@ public Base(
.build())
.build());
this.client = this.sdkConfiguration.client();
this.operationGlobals = new Globals();
this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id")
.ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param));
this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id")
.ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param));
}

Optional<SecuritySource> securitySource() {
Expand Down Expand Up @@ -125,8 +132,8 @@ <T>HttpRequest buildRequest(T request, Class<T> klass) throws Exception {
req.addQueryParams(Utils.getQueryParams(
klass,
request,
this.sdkConfiguration.globals));
req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals));
this.operationGlobals));
req.addHeaders(Utils.getHeadersFromMetadata(request, this.operationGlobals));
Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity());

return req.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.apideck.unify.utils.AsyncRetries;
import com.apideck.unify.utils.BackoffStrategy;
import com.apideck.unify.utils.Blob;
import com.apideck.unify.utils.Globals;
import com.apideck.unify.utils.HTTPClient;
import com.apideck.unify.utils.HTTPRequest;
import com.apideck.unify.utils.Headers;
Expand Down Expand Up @@ -58,6 +59,7 @@ static abstract class Base {
final RetryConfig retryConfig;
final HTTPClient client;
final Headers _headers;
final Globals operationGlobals;

public Base(
SDKConfiguration sdkConfiguration, Optional<Options> options,
Expand All @@ -81,6 +83,11 @@ public Base(
.build())
.build());
this.client = this.sdkConfiguration.client();
this.operationGlobals = new Globals();
this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id")
.ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param));
this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id")
.ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param));
}

Optional<SecuritySource> securitySource() {
Expand Down Expand Up @@ -118,7 +125,7 @@ <T>HttpRequest buildRequest(T request, Class<T> klass) throws Exception {
klass,
this.baseUrl,
"/accounting/attachments/{reference_type}/{reference_id}",
request, this.sdkConfiguration.globals);
request, this.operationGlobals);
HTTPRequest req = new HTTPRequest(url, "GET");
req.addHeader("Accept", "application/json")
.addHeader("user-agent", SDKConfiguration.USER_AGENT);
Expand All @@ -127,8 +134,8 @@ <T>HttpRequest buildRequest(T request, Class<T> klass) throws Exception {
req.addQueryParams(Utils.getQueryParams(
klass,
request,
this.sdkConfiguration.globals));
req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals));
this.operationGlobals));
req.addHeaders(Utils.getHeadersFromMetadata(request, this.operationGlobals));
Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity());

return req.build();
Expand Down
Loading