Skip to content

Commit 417db63

Browse files
Merge pull request #54 from gleanwork/speakeasy-sdk-regen-1763754358
chore: 🐝 Update SDK - Generate 0.12.6
2 parents c007a2c + 791a1a1 commit 417db63

File tree

19 files changed

+204
-51
lines changed

19 files changed

+204
-51
lines changed

.speakeasy/gen.lock

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
lockVersion: 2.0.0
22
id: 0359d4fe-2923-46fc-aaca-cf70b48dcfa1
33
management:
4-
docChecksum: 3e5657019a4816420ae24bbe0aa55deb
4+
docChecksum: 41ef1db10b9ee826f7c797f827bf843b
55
docVersion: 0.9.0
6-
speakeasyVersion: 1.659.0
7-
generationVersion: 2.755.9
8-
releaseVersion: 0.12.5
9-
configChecksum: e8a09cf1b489e694a4b1e3d39c5baf5a
6+
speakeasyVersion: 1.660.0
7+
generationVersion: 2.760.2
8+
releaseVersion: 0.12.6
9+
configChecksum: 1e696eaf665ff4cedc7707af622795d5
1010
repoURL: https://github.com/gleanwork/api-client-java.git
1111
published: true
1212
features:
1313
java:
1414
additionalDependencies: 0.1.0
1515
additionalProperties: 0.0.1
1616
constsAndDefaults: 0.1.1
17-
core: 3.55.2
17+
core: 3.55.3
1818
deprecations: 2.81.1
1919
examples: 2.81.6
2020
flattening: 2.81.1
@@ -2035,6 +2035,7 @@ generatedFiles:
20352035
- src/main/java/com/glean/api_client/glean_api_client/utils/SerializedBody.java
20362036
- src/main/java/com/glean/api_client/glean_api_client/utils/SessionManager.java
20372037
- src/main/java/com/glean/api_client/glean_api_client/utils/SpeakeasyHTTPClient.java
2038+
- src/main/java/com/glean/api_client/glean_api_client/utils/SpeakeasyLogger.java
20382039
- src/main/java/com/glean/api_client/glean_api_client/utils/SpeakeasyMetadata.java
20392040
- src/main/java/com/glean/api_client/glean_api_client/utils/StreamingParser.java
20402041
- src/main/java/com/glean/api_client/glean_api_client/utils/TypedObject.java
@@ -2897,6 +2898,3 @@ generatedTests:
28972898
get_/rest/api/v1/tools/list: "2025-06-09T18:03:44Z"
28982899
post_/rest/api/v1/tools/call: "2025-06-09T18:03:44Z"
28992900
listpolicies: "2025-06-09T18:03:44Z"
2900-
releaseNotes: |
2901-
## Java SDK Changes Detected:
2902-
* `glean.client.insights.retrieve()`: `response` **Changed** **Breaking** :warning:

.speakeasy/gen.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ generation:
2525
generateNewTests: false
2626
skipResponseBodyAssertions: false
2727
java:
28-
version: 0.12.5
28+
version: 0.12.6
2929
additionalDependencies: []
3030
additionalPlugins: []
3131
artifactID: glean-api-client
@@ -37,8 +37,8 @@ java:
3737
companyURL: https://www.glean.com
3838
defaultErrorName: APIException
3939
enableCustomCodeRegions: false
40+
enableSlf4jLogging: false
4041
enableStreamingUploads: false
41-
enhancedUnionMemberResolution: true
4242
envVarPrefix: GLEAN
4343
flattenGlobalSecurity: true
4444
generateOptionalUnionAccessors: false
@@ -62,6 +62,8 @@ java:
6262
maxMethodParams: 4
6363
nullFriendlyParameters: false
6464
openUnions: true
65+
operationScopedParams: true
6566
outputModelSuffix: output
6667
projectName: glean-api-client
6768
templateVersion: v2
69+
unionStrategy: populated-fields

.speakeasy/glean-merged-spec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openapi: 3.0.0
22
info:
33
version: 0.9.0
44
title: Glean API
5-
x-source-commit-sha: 31b1e4d8c27047c952fd0380361790a2edfdd676
5+
x-source-commit-sha: 1425f20d12ba174f1027dd4c1a2025ea90c478d0
66
description: |
77
# Introduction
88
In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean.
@@ -22,7 +22,7 @@ info:
2222
These API clients provide type-safe, idiomatic interfaces for working with Glean IndexingAPIs in your language of choice.
2323
x-logo:
2424
url: https://app.glean.com/images/glean-text2.svg
25-
x-open-api-commit-sha: e4416ec5a5adef38fa93d4fef0557174d402e553
25+
x-open-api-commit-sha: d64fddf87afc72563e898e93cb865ec43bb84b9d
2626
x-speakeasy-name: 'Glean API'
2727
servers:
2828
- url: https://{instance}-be.glean.com

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
speakeasyVersion: 1.659.0
1+
speakeasyVersion: 1.660.0
22
sources:
33
Glean API:
44
sourceNamespace: glean-api-specs
5-
sourceRevisionDigest: sha256:f069447b3ec0cb20ea0970c07b80ca54a16c3dc5b22628309ef86c46822715bd
6-
sourceBlobDigest: sha256:88f92162774c14a5edef7dbbd63efbd68f6e3cf857f9f312a2c98342392829b2
5+
sourceRevisionDigest: sha256:1374b687db05b30dae84e389939d51405ba11a62e9244bae3bcde62e240d59ca
6+
sourceBlobDigest: sha256:393d42e2c8a875f5cc4225467a90d4b39a4d7db0440d4a50a592fe3f50ff809f
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1763415086
9+
- speakeasy-sdk-regen-1763754358
1010
Glean-OAS:
1111
sourceNamespace: glean-oas
1212
sourceRevisionDigest: sha256:8841834dd58ddd4e2dcf98fc90fbd06fbf3626a29df941503cce55b9548a5317
@@ -18,10 +18,10 @@ targets:
1818
glean:
1919
source: Glean API
2020
sourceNamespace: glean-api-specs
21-
sourceRevisionDigest: sha256:f069447b3ec0cb20ea0970c07b80ca54a16c3dc5b22628309ef86c46822715bd
22-
sourceBlobDigest: sha256:88f92162774c14a5edef7dbbd63efbd68f6e3cf857f9f312a2c98342392829b2
21+
sourceRevisionDigest: sha256:1374b687db05b30dae84e389939d51405ba11a62e9244bae3bcde62e240d59ca
22+
sourceBlobDigest: sha256:393d42e2c8a875f5cc4225467a90d4b39a4d7db0440d4a50a592fe3f50ff809f
2323
codeSamplesNamespace: glean-api-specs-java-code-samples
24-
codeSamplesRevisionDigest: sha256:8954db613022b52590245e69522e57d6fc8f9548a899ba0bfb9abbbd88cbbf09
24+
codeSamplesRevisionDigest: sha256:ab5557e4e7bc8f0b5e37d493be75162ea642153bc0454820a37953274cafb187
2525
workflow:
2626
workflowVersion: 1.0.0
2727
speakeasyVersion: latest

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ The samples below show how a published SDK artifact is used:
6565

6666
Gradle:
6767
```groovy
68-
implementation 'com.glean.api-client:glean-api-client:0.12.5'
68+
implementation 'com.glean.api-client:glean-api-client:0.12.6'
6969
```
7070

7171
Maven:
7272
```xml
7373
<dependency>
7474
<groupId>com.glean.api-client</groupId>
7575
<artifactId>glean-api-client</artifactId>
76-
<version>0.12.5</version>
76+
<version>0.12.6</version>
7777
</dependency>
7878
```
7979

@@ -1561,9 +1561,11 @@ public class Application {
15611561
## Debugging
15621562

15631563
### Debug
1564+
15641565
You can setup your SDK to emit debug logs for SDK requests and responses.
15651566

15661567
For request and response logging (especially json bodies), call `enableHTTPDebugLogging(boolean)` on the SDK builder like so:
1568+
15671569
```java
15681570
SDK.builder()
15691571
.enableHTTPDebugLogging(true)
@@ -1581,10 +1583,11 @@ Response body:
15811583
"token": "global"
15821584
}
15831585
```
1584-
__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`.
1586+
__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`.
15851587

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

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

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,4 +398,14 @@ Based on:
398398
### Generated
399399
- [java v0.12.5] .
400400
### Releases
401-
- [Maven Central v0.12.5] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.12.5 - .
401+
- [Maven Central v0.12.5] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.12.5 - .
402+
403+
## 2025-11-21 19:45:30
404+
### Changes
405+
Based on:
406+
- OpenAPI Doc
407+
- Speakeasy CLI 1.660.0 (2.760.2) https://github.com/speakeasy-api/speakeasy
408+
### Generated
409+
- [java v0.12.6] .
410+
### Releases
411+
- [Maven Central v0.12.6] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.12.6 - .

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
groupId=com.glean.api-client
22
artifactId=glean-api-client
3-
version=0.12.5
3+
version=0.12.6
44
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g

spring/glean-api-client-spring-boot-autoconfigure/src/main/java/com/glean/api_client/glean_api_client/GleanApiClientAutoConfig.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public RetryConfig retryConfig(GleanApiClientAutoConfigProperties properties) {
7272
// Default retry config for other strategies
7373
return RetryConfig.builder().build();
7474
}
75-
7675
/**
7776
* Creates a {@code Consumer<String>} bean for HTTP debug logging if none exists.
7877
* This logger is used by the SpeakeasyHTTPClient for debug output when debug logging is enabled.
@@ -85,7 +84,6 @@ public RetryConfig retryConfig(GleanApiClientAutoConfigProperties properties) {
8584
public Consumer<String> httpLogger() {
8685
return System.out::println;
8786
}
88-
8987
/**
9088
* Creates an HTTPClient bean if none exists.
9189
*

src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public class SDKConfiguration {
2424

2525
private static final String LANGUAGE = "java";
2626
public static final String OPENAPI_DOC_VERSION = "0.9.0";
27-
public static final String SDK_VERSION = "0.12.5";
28-
public static final String GEN_VERSION = "2.755.9";
27+
public static final String SDK_VERSION = "0.12.6";
28+
public static final String GEN_VERSION = "2.760.2";
2929
private static final String BASE_PACKAGE = "com.glean.api_client.glean_api_client";
3030
public static final String USER_AGENT =
3131
String.format("speakeasy-sdk/%s %s %s %s %s",

src/main/java/com/glean/api_client/glean_api_client/utils/AsyncHooks.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
// ThreadSafe
3535
public class AsyncHooks implements BeforeRequest, AfterSuccess, AfterError {
3636

37+
private static final SpeakeasyLogger logger = SpeakeasyLogger.getLogger(AsyncHooks.class);
38+
3739
// we use CopyOnWriteArrayList for thread safety
3840
private final List<BeforeRequest> beforeRequestHooks = new CopyOnWriteArrayList<>();
3941
private final List<AfterSuccess> afterSuccessHooks = new CopyOnWriteArrayList<>();
@@ -51,6 +53,7 @@ public AsyncHooks() {
5153
public AsyncHooks registerBeforeRequest(BeforeRequest beforeRequest) {
5254
Utils.checkNotNull(beforeRequest, "beforeRequest");
5355
this.beforeRequestHooks.add(beforeRequest);
56+
logger.debug("Registered async BeforeRequest hook: {} (total: {})", beforeRequest.getClass().getSimpleName(), beforeRequestHooks.size());
5457
return this;
5558
}
5659

@@ -63,6 +66,7 @@ public AsyncHooks registerBeforeRequest(BeforeRequest beforeRequest) {
6366
public AsyncHooks registerAfterSuccess(AfterSuccess afterSuccess) {
6467
Utils.checkNotNull(afterSuccess, "afterSuccess");
6568
this.afterSuccessHooks.add(afterSuccess);
69+
logger.debug("Registered async AfterSuccess hook: {} (total: {})", afterSuccess.getClass().getSimpleName(), afterSuccessHooks.size());
6670
return this;
6771
}
6872

@@ -75,6 +79,7 @@ public AsyncHooks registerAfterSuccess(AfterSuccess afterSuccess) {
7579
public AsyncHooks registerAfterError(AfterError afterError) {
7680
Utils.checkNotNull(afterError, "afterError");
7781
this.afterErrorHooks.add(afterError);
82+
logger.debug("Registered async AfterError hook: {} (total: {})", afterError.getClass().getSimpleName(), afterErrorHooks.size());
7883
return this;
7984
}
8085

@@ -83,6 +88,10 @@ public CompletableFuture<HttpRequest> beforeRequest(BeforeRequestContext context
8388
Utils.checkNotNull(context, "context");
8489
Utils.checkNotNull(request, "request");
8590

91+
if (logger.isTraceEnabled() && !beforeRequestHooks.isEmpty()) {
92+
logger.trace("Executing {} async beforeRequest hook(s) for operation: {}", beforeRequestHooks.size(), context.operationId());
93+
}
94+
8695
CompletableFuture<HttpRequest> result = CompletableFuture.completedFuture(request);
8796

8897
for (BeforeRequest hook : beforeRequestHooks) {
@@ -99,6 +108,10 @@ public CompletableFuture<HttpResponse<Blob>> afterSuccess(
99108
Utils.checkNotNull(context, "context");
100109
Utils.checkNotNull(response, "response");
101110

111+
if (logger.isTraceEnabled() && !afterSuccessHooks.isEmpty()) {
112+
logger.trace("Executing {} async afterSuccess hook(s) for operation: {}", afterSuccessHooks.size(), context.operationId());
113+
}
114+
102115
CompletableFuture<HttpResponse<Blob>> result = CompletableFuture.completedFuture(response);
103116

104117
for (AfterSuccess hook : afterSuccessHooks) {
@@ -127,6 +140,10 @@ public CompletableFuture<HttpResponse<Blob>> afterError(
127140
(response != null) ^ (error != null),
128141
"one and only one of response or error must be present");
129142

143+
if (logger.isTraceEnabled() && !afterErrorHooks.isEmpty()) {
144+
logger.trace("Executing {} async afterError hook(s) for operation: {}", afterErrorHooks.size(), context.operationId());
145+
}
146+
130147
CompletableFuture<HttpResponse<Blob>> result;
131148
if (response != null) {
132149
result = CompletableFuture.completedFuture(response);
@@ -147,6 +164,7 @@ public CompletableFuture<HttpResponse<Blob>> afterError(
147164
failedEarly.set(true);
148165
throw (FailEarlyException) hookErr;
149166
}
167+
logger.debug("Async hook threw exception: {}", hookErr.getClass().getSimpleName());
150168
throw Exceptions.unchecked(hookErr);
151169
}
152170
if (hookResp == null) {

0 commit comments

Comments
 (0)