diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index b8d04253..d8541d11 100644
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,26 +1,26 @@
lockVersion: 2.0.0
id: 5bbaa3a9-baa0-471b-ba6a-13fd88e8c119
management:
- docChecksum: dc20363f8b5b98547871a6b5350a4ccb
+ docChecksum: 51b03d3086f63341c3159b74c09622a6
docVersion: 1.0.0
- speakeasyVersion: 1.759.3
- generationVersion: 2.869.25
- releaseVersion: 2.16.50
- configChecksum: 066a7034b7b7bc20c6765cc55b1bc2e4
+ speakeasyVersion: 1.760.0
+ generationVersion: 2.873.1
+ releaseVersion: 2.16.51
+ configChecksum: 72edbb0684c2b566c7f1bb663e036a62
repoURL: https://github.com/gr4vy/gr4vy-java.git
installationURL: https://github.com/gr4vy/gr4vy-java
published: true
persistentEdits:
- generation_id: 4395450c-fea6-492d-ab66-5f720af31dad
- pristine_commit_hash: d490e56868c26e0348ccb0f582a09e6a4b9bf258
- pristine_tree_hash: e17af3deefae767b93eca39e156f87854f9b50aa
+ generation_id: 42781d40-e432-4fdd-87aa-ae0016178f9c
+ pristine_commit_hash: 9b295150ca6f5a912c049a69d4abce66a2542227
+ pristine_tree_hash: 71f373df5e4be51d47bc0704a14023d7870970a9
features:
java:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.3
- core: 3.55.22
+ core: 3.55.23
flattening: 2.81.1
- globalSecurity: 2.83.2
+ globalSecurity: 2.83.4
globalSecurityCallbacks: 0.1.0
globalSecurityFlattening: 0.1.0
globalServerURLs: 2.83.1
@@ -2382,8 +2382,8 @@ trackedFiles:
pristine_git_object: 15c4e4642f204ccb312d8814155b69e153b4e19b
gradle.properties:
id: 2afbb999f001
- last_write_checksum: sha1:f9294b05290d70d1a54f6d4b48954e5823ab9cc3
- pristine_git_object: 2814d83898c72053f48cfac224c53290e0a3f550
+ last_write_checksum: sha1:d3a5dd308aeb3f4ebd95ab464a01aa68970c62b4
+ pristine_git_object: ad977a4324cf23529851cfbdbd4b97f6d37c57e2
gradle/wrapper/gradle-wrapper.jar:
id: ec27dae6e852
last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611
@@ -2706,8 +2706,8 @@ trackedFiles:
pristine_git_object: 502a7312d3dc82c102dbaf7ed5e952d0c793e26f
src/main/java/com/gr4vy/sdk/SDKConfiguration.java:
id: 73a7edeaca45
- last_write_checksum: sha1:9209ca39fd069c85fbaabf4836761e5cfe10c5e2
- pristine_git_object: 3ef4161e28592807a7496cc9a1eb0e1348265f25
+ last_write_checksum: sha1:a8a995a72d6a44785a1d2b336798c17f5bc70d4f
+ pristine_git_object: fbd34cb3cb4dbc5f6e967cd5acb1ee59a844aa4b
src/main/java/com/gr4vy/sdk/SecuritySource.java:
id: 1b6add6b9b50
last_write_checksum: sha1:2f365cc823c6243188e83f4df618c9737fcee8bd
@@ -6798,12 +6798,12 @@ trackedFiles:
pristine_git_object: 949a4a31c6ae97ff73623b1200001ea60fb219b2
src/main/java/com/gr4vy/sdk/utils/Security.java:
id: 8f93474a370e
- last_write_checksum: sha1:3cb0c57c59bf6fbfa337a14defa91234e0311a77
- pristine_git_object: a20fca31d1e204e0cf780445d4d265455ea71f41
+ last_write_checksum: sha1:5aa8a43fbc374f9947dd4194b1b4aa09c74b380f
+ pristine_git_object: 8ae265ad86296538f92cce56028da9a3994beb7e
src/main/java/com/gr4vy/sdk/utils/SecurityMetadata.java:
id: 23577fb2f4b9
- last_write_checksum: sha1:02f5a9ebde25eb03d947711d81d580766f146295
- pristine_git_object: 9132374065fc5a324a22efbb5c726ff055bed15f
+ last_write_checksum: sha1:8d04940c05091c7d707d4f78ebce9467d9fd1f8b
+ pristine_git_object: ba37fc547488aac6e1b73811c20a9521c6d6ed29
src/main/java/com/gr4vy/sdk/utils/SerializedBody.java:
id: 89853ad52436
last_write_checksum: sha1:d80e55e06c669faf81edc0f133388dd690772f6e
@@ -6846,8 +6846,8 @@ trackedFiles:
pristine_git_object: 1381df61cea0f4f9c967cfc339dae3505fa15357
src/main/java/com/gr4vy/sdk/utils/Utils.java:
id: 3e329f0c996a
- last_write_checksum: sha1:6e4ec81d73c5c1819eb1bc083e282796db9ff0e7
- pristine_git_object: d37522606c0fd19f3a911aa9db8b839e2149e6e4
+ last_write_checksum: sha1:ea4e330c4740aad89fcbe88e113f97b24fc3343c
+ pristine_git_object: bcb5e713103030d843ac8d1dce75e3b1b22814f2
src/main/java/com/gr4vy/sdk/utils/pagination/AsyncPaginator.java:
id: 48a0072a494a
last_write_checksum: sha1:a2f016ee27c4f925c52401ce751aedf909e773a1
@@ -10615,7 +10615,6 @@ examples:
application/json: {"type": "error", "code": "gateway_timeout", "status": 504, "message": "Request could not be processed"}
examplesVersion: 1.0.2
generatedTests: {}
-releaseNotes: "## Java SDK Changes:\n* `gr4vy.transactions.create()`: \n * `request.transactionCreate.connectionOptions` **Changed**\n* `gr4vy.transactions.update()`: \n * `request.transactionUpdate.connectionOptions` **Changed**\n* `gr4vy.paymentLinks.create()`: \n * `request.paymentLinkCreate.connectionOptions` **Changed**\n"
generatedFiles:
- .gitattributes
- USAGE.md
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index dc46e14c..2aa198d1 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -30,7 +30,7 @@ generation:
generateNewTests: false
skipResponseBodyAssertions: false
java:
- version: 2.16.50
+ version: 2.16.51
additionalDependencies:
- testImplementation:org.junit.jupiter:junit-jupiter:5.10.0
- implementation:com.auth0:java-jwt:4.5.0
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 38ed63cd..eb80888c 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -1,4 +1,4 @@
-speakeasyVersion: 1.759.3
+speakeasyVersion: 1.760.0
sources:
Gr4vy:
sourceNamespace: openapi
@@ -9,8 +9,8 @@ sources:
- 1.0.0
openapi:
sourceNamespace: openapi
- sourceRevisionDigest: sha256:cdd2abb9a296846525779e4433b5719f6f92afa9cdecd9040513e399902866d1
- sourceBlobDigest: sha256:85c126d56e378330e849d5eae0d0971bb71461d09b705f2d429aaa5cf33b3d97
+ sourceRevisionDigest: sha256:81fa0b747f004b99bf676fd74b51f6779dc8ebf808f6b19558bc751240943068
+ sourceBlobDigest: sha256:04eaddea66ea47506ae3930f7c6650661cfda125f1ed9b85c52a621f82a22c8c
tags:
- latest
- 1.0.0
@@ -25,10 +25,10 @@ targets:
java:
source: openapi
sourceNamespace: openapi
- sourceRevisionDigest: sha256:cdd2abb9a296846525779e4433b5719f6f92afa9cdecd9040513e399902866d1
- sourceBlobDigest: sha256:85c126d56e378330e849d5eae0d0971bb71461d09b705f2d429aaa5cf33b3d97
+ sourceRevisionDigest: sha256:81fa0b747f004b99bf676fd74b51f6779dc8ebf808f6b19558bc751240943068
+ sourceBlobDigest: sha256:04eaddea66ea47506ae3930f7c6650661cfda125f1ed9b85c52a621f82a22c8c
codeSamplesNamespace: openapi-java-code-samples
- codeSamplesRevisionDigest: sha256:f133ebb2dc5c554fc91bad0baa3c7946a5b17ff92b468f180aa60da8badb46e2
+ codeSamplesRevisionDigest: sha256:053800d6917b17df26cb149dc3ab06fa81760dfd7574c8e7a9b40834bbdab224
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
diff --git a/README.md b/README.md
index 489ad811..39ff8425 100644
--- a/README.md
+++ b/README.md
@@ -59,7 +59,7 @@ The samples below show how a published SDK artifact is used:
Gradle:
```groovy
-implementation 'com.gr4vy:sdk:2.16.50'
+implementation 'com.gr4vy:sdk:2.16.51'
```
Maven:
@@ -67,7 +67,7 @@ Maven:
com.gr4vy
sdk
- 2.16.50
+ 2.16.51
```
diff --git a/RELEASES.md b/RELEASES.md
index a1169d98..387440d1 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1338,4 +1338,14 @@ Based on:
### Generated
- [java v2.16.50] .
### Releases
-- [Maven Central v2.16.50] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.16.50 - .
\ No newline at end of file
+- [Maven Central v2.16.50] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.16.50 - .
+
+## 2026-03-30 16:15:03
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.760.0 (2.873.1) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [java v2.16.51] .
+### Releases
+- [Maven Central v2.16.51] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.16.51 - .
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 2814d838..ad977a43 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
groupId=com.gr4vy
artifactId=sdk
-version=2.16.50
+version=2.16.51
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
diff --git a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
index 3ef4161e..fbd34cb3 100644
--- a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
+++ b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
@@ -22,8 +22,8 @@ public class SDKConfiguration {
private static final String LANGUAGE = "java";
public static final String OPENAPI_DOC_VERSION = "1.0.0";
- public static final String SDK_VERSION = "2.16.50";
- public static final String GEN_VERSION = "2.869.25";
+ public static final String SDK_VERSION = "2.16.51";
+ public static final String GEN_VERSION = "2.873.1";
private static final String BASE_PACKAGE = "com.gr4vy.sdk";
public static final String USER_AGENT =
String.format("speakeasy-sdk/%s %s %s %s %s",
diff --git a/src/main/java/com/gr4vy/sdk/utils/Security.java b/src/main/java/com/gr4vy/sdk/utils/Security.java
index a20fca31..8ae265ad 100644
--- a/src/main/java/com/gr4vy/sdk/utils/Security.java
+++ b/src/main/java/com/gr4vy/sdk/utils/Security.java
@@ -5,6 +5,7 @@
import java.lang.reflect.Field;
import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Base64;
import java.util.Deque;
@@ -23,9 +24,22 @@ private Security() {
// prevent instantiation
}
- public static HTTPRequest configureSecurity(HTTPRequest request, Object security) throws Exception {
+ public static HTTPRequest configureSecurity(HTTPRequest request, Object security, String... allowedFields) throws Exception {
if (security != null) {
- Field[] fields = security.getClass().getDeclaredFields();
+ Field[] fields;
+ if (allowedFields.length > 0) {
+ List ordered = new ArrayList<>();
+ for (String name : allowedFields) {
+ try {
+ ordered.add(security.getClass().getDeclaredField(name));
+ } catch (NoSuchFieldException e) {
+ // skip unknown fields
+ }
+ }
+ fields = ordered.toArray(new Field[0]);
+ } else {
+ fields = security.getClass().getDeclaredFields();
+ }
for (Field field : fields) {
field.setAccessible(true);
@@ -41,6 +55,9 @@ public static HTTPRequest configureSecurity(HTTPRequest request, Object security
if (securityMetadata.option) {
parseSecurityOption(request, value);
+ if (!securityMetadata.composite) {
+ return request;
+ }
} else if (securityMetadata.scheme) {
if ((securityMetadata.subtype != null && securityMetadata.subtype.equals("basic"))
&& Types.getType(value.getClass()) != Types.OBJECT) {
@@ -48,6 +65,9 @@ public static HTTPRequest configureSecurity(HTTPRequest request, Object security
} else {
parseSecurityScheme(request, securityMetadata, value);
}
+ if (!securityMetadata.composite) {
+ return request;
+ }
}
}
}
@@ -71,7 +91,12 @@ private static void parseSecurityOption(HTTPRequest request, Object option)
continue;
}
- parseSecurityScheme(request, securityMetadata, value);
+ if (securityMetadata.subtype != null && securityMetadata.subtype.equals("basic")
+ && Types.getType(value.getClass()) != Types.OBJECT) {
+ parseSecurityScheme(request, securityMetadata, option);
+ } else {
+ parseSecurityScheme(request, securityMetadata, value);
+ }
}
}
diff --git a/src/main/java/com/gr4vy/sdk/utils/SecurityMetadata.java b/src/main/java/com/gr4vy/sdk/utils/SecurityMetadata.java
index 91323740..ba37fc54 100644
--- a/src/main/java/com/gr4vy/sdk/utils/SecurityMetadata.java
+++ b/src/main/java/com/gr4vy/sdk/utils/SecurityMetadata.java
@@ -11,6 +11,7 @@ class SecurityMetadata {
String subtype;
boolean option;
boolean scheme;
+ boolean composite;
String name;
private SecurityMetadata() {
diff --git a/src/main/java/com/gr4vy/sdk/utils/Utils.java b/src/main/java/com/gr4vy/sdk/utils/Utils.java
index d3752260..bcb5e713 100644
--- a/src/main/java/com/gr4vy/sdk/utils/Utils.java
+++ b/src/main/java/com/gr4vy/sdk/utils/Utils.java
@@ -308,8 +308,8 @@ public static List getQueryParams(Class ty
return QueryParameters.parseQueryParams(type, params, globals);
}
- public static HTTPRequest configureSecurity(HTTPRequest request, Object security) throws Exception {
- return Security.configureSecurity(request, security);
+ public static HTTPRequest configureSecurity(HTTPRequest request, Object security, String... allowedFields) throws Exception {
+ return Security.configureSecurity(request, security, allowedFields);
}
private static final String DOLLAR_MARKER = "D9qPtyhOYzkHGu3c";