Skip to content

Commit 0acf0a2

Browse files
authored
Merge pull request #4 from Benzinga/speakeasy-sdk-regen-1732895894
chore: 🐝 Update SDK - Generate 0.2.7
2 parents c14facd + 1b5d2aa commit 0acf0a2

File tree

9 files changed

+123
-104
lines changed

9 files changed

+123
-104
lines changed

.speakeasy/gen.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ management:
55
docVersion: 1.0.0
66
speakeasyVersion: 1.448.2
77
generationVersion: 2.467.4
8-
releaseVersion: 0.2.6
9-
configChecksum: eb4f32fbb806e5e85694ec38d2d1065a
8+
releaseVersion: 0.2.7
9+
configChecksum: 540e550d2c5cf11b17ce780258e3d2b8
1010
repoURL: https://github.com/Benzinga/bz-java-client.git
1111
published: true
1212
features:

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ generation:
1313
oAuth2ClientCredentialsEnabled: false
1414
oAuth2PasswordEnabled: false
1515
java:
16-
version: 0.2.6
16+
version: 0.2.7
1717
additionalDependencies: []
1818
additionalPlugins: []
1919
artifactID: BZClient

.speakeasy/workflow.lock

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ sources: {}
33
targets:
44
bzclient:
55
source: BZ_APIs
6-
codeSamplesNamespace: bz-java-client-code-samples
7-
codeSamplesRevisionDigest: sha256:7cd3cf7a12b2c66a2fd247d1401cf14f9b3fafa358e2422f46e2c78492a3782c
86
workflow:
97
workflowVersion: 1.0.0
108
speakeasyVersion: latest

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ The samples below show how a published SDK artifact is used:
4848

4949
Gradle:
5050
```groovy
51-
implementation 'org.benzinga:BZClient:0.2.6'
51+
implementation 'org.benzinga:BZClient:0.2.7'
5252
```
5353

5454
Maven:
5555
```xml
5656
<dependency>
5757
<groupId>org.benzinga</groupId>
5858
<artifactId>BZClient</artifactId>
59-
<version>0.2.6</version>
59+
<version>0.2.7</version>
6060
</dependency>
6161
```
6262

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,14 @@ Based on:
2626
### Generated
2727
- [java v0.2.2] .
2828
### Releases
29-
- [Maven Central v0.2.2] https://central.sonatype.com/artifact/org.benzinga/BZClient/0.2.2 - .
29+
- [Maven Central v0.2.2] https://central.sonatype.com/artifact/org.benzinga/BZClient/0.2.2 - .
30+
31+
## 2024-11-29 15:58:10
32+
### Changes
33+
Based on:
34+
- OpenAPI Doc
35+
- Speakeasy CLI 1.448.2 (2.467.4) https://github.com/speakeasy-api/speakeasy
36+
### Generated
37+
- [java v0.2.7] .
38+
### Releases
39+
- [Maven Central v0.2.7] https://central.sonatype.com/artifact/org.benzinga/BZClient/0.2.7 - .

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ tasks.withType(Javadoc) {
6363
}
6464

6565
group = "org.benzinga"
66-
version = "0.2.6"
66+
version = "0.2.7"
6767

6868
sourcesJar {
6969
archiveBaseName = "BZClient"
@@ -101,7 +101,7 @@ publishing {
101101
maven(MavenPublication) {
102102
groupId = 'org.benzinga'
103103
artifactId = 'BZClient'
104-
version = '0.2.6'
104+
version = '0.2.7'
105105

106106
from components.java
107107

gradlew.bat

Lines changed: 92 additions & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/org/benzinga/BZClient/Bzclient.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,11 @@ public Builder retryConfig(RetryConfig retryConfig) {
357357
this.sdkConfiguration.retryConfig = Optional.of(retryConfig);
358358
return this;
359359
}
360+
// Visible for testing, will be accessed via reflection
361+
void _hooks(org.benzinga.BZClient.utils.Hooks hooks) {
362+
sdkConfiguration.setHooks(hooks);
363+
}
364+
360365
/**
361366
* Builds a new instance of the SDK.
362367
* @return The SDK instance.

src/main/java/org/benzinga/BZClient/SDKConfiguration.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
import java.lang.String;
88
import java.util.Optional;
9+
import org.benzinga.BZClient.hooks.SDKHooks;
910
import org.benzinga.BZClient.utils.HTTPClient;
11+
import org.benzinga.BZClient.utils.Hook.SdkInitData;
1012
import org.benzinga.BZClient.utils.Hooks;
1113
import org.benzinga.BZClient.utils.RetryConfig;
1214

@@ -21,7 +23,7 @@ public Optional<SecuritySource> securitySource() {
2123
public int serverIdx = 0;
2224
private static final String LANGUAGE = "java";
2325
public static final String OPENAPI_DOC_VERSION = "1.0.0";
24-
public static final String SDK_VERSION = "0.2.6";
26+
public static final String SDK_VERSION = "0.2.7";
2527
public static final String GEN_VERSION = "2.467.4";
2628
private static final String BASE_PACKAGE = "org.benzinga.BZClient";
2729
public static final String USER_AGENT =
@@ -47,7 +49,11 @@ public void setHooks(Hooks hooks) {
4749
* Initializes state (for example hooks).
4850
**/
4951
public void initialize() {
50-
52+
SDKHooks.initialize(_hooks);
53+
// apply the sdk init hook immediately
54+
SdkInitData data = _hooks.sdkInit(new SdkInitData(serverUrl, defaultClient));
55+
this.serverUrl = data.baseUrl();
56+
this.defaultClient = data.client();
5157
}
5258

5359

0 commit comments

Comments
 (0)