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
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ id: 0359d4fe-2923-46fc-aaca-cf70b48dcfa1
management:
docChecksum: bb65a174a6b697994f7bde3845843d9d
docVersion: 0.9.0
speakeasyVersion: 1.576.1
generationVersion: 2.651.2
releaseVersion: 0.6.0
configChecksum: 36947d923e8382f9287cbfeee1bf3f84
speakeasyVersion: 1.580.2
generationVersion: 2.656.5
releaseVersion: 0.7.0
configChecksum: 5763d80380dc0fbbb84875250841f11a
repoURL: https://github.com/gleanwork/api-client-java.git
published: true
features:
java:
additionalDependencies: 0.1.0
additionalProperties: 0.0.1
constsAndDefaults: 0.1.1
core: 3.42.3
core: 3.44.0
deprecations: 2.81.1
examples: 2.81.5
examples: 2.81.6
flattening: 2.81.1
globalSecurity: 2.83.0
globalSecurityCallbacks: 0.1.0
Expand Down
3 changes: 2 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ generation:
generateNewTests: false
skipResponseBodyAssertions: false
java:
version: 0.6.0
version: 0.7.0
additionalDependencies: []
additionalPlugins: []
artifactID: glean-api-client
Expand Down Expand Up @@ -51,6 +51,7 @@ java:
shortName: MIT
url: https://mit-license.org/
maxMethodParams: 4
nullFriendlyParameters: false
outputModelSuffix: output
projectName: glean-api-client
templateVersion: v2
6 changes: 3 additions & 3 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
speakeasyVersion: 1.576.1
speakeasyVersion: 1.580.2
sources:
Glean API:
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:57fc6af98e6e9e98c92547985293be8fafd52d2a1d1ef88d4b24636743b9f119
sourceBlobDigest: sha256:01cf4577ff2f15ba160b16bba410571a8ba0c5fefa7e6dd7101edef7ef7c68dc
tags:
- latest
- speakeasy-sdk-regen-1750453706
- speakeasy-sdk-regen-1751974088
Glean-OAS:
sourceNamespace: glean-oas
sourceRevisionDigest: sha256:8841834dd58ddd4e2dcf98fc90fbd06fbf3626a29df941503cce55b9548a5317
Expand All @@ -21,7 +21,7 @@ targets:
sourceRevisionDigest: sha256:57fc6af98e6e9e98c92547985293be8fafd52d2a1d1ef88d4b24636743b9f119
sourceBlobDigest: sha256:01cf4577ff2f15ba160b16bba410571a8ba0c5fefa7e6dd7101edef7ef7c68dc
codeSamplesNamespace: glean-api-specs-java-code-samples
codeSamplesRevisionDigest: sha256:0b38a88f263a55a5ce1d7a0938446b8192c36e32ab974acc6c9dff2a62fc28d1
codeSamplesRevisionDigest: sha256:696df3780275658d9e4fab559fceb2dc36adeff8f6055db8303641ed1f4e7d6c
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
63 changes: 34 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Remember that each namespace requires its own authentication token type as descr
* [Available Resources and Operations](#available-resources-and-operations)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Debugging](#debugging)
* [Development](#development)
* [Maturity](#maturity)
* [Contributions](#contributions)
Expand All @@ -62,15 +63,15 @@ The samples below show how a published SDK artifact is used:

Gradle:
```groovy
implementation 'com.glean.api-client:glean-api-client:0.6.0'
implementation 'com.glean.api-client:glean-api-client:0.7.0'
```

Maven:
```xml
<dependency>
<groupId>com.glean.api-client</groupId>
<artifactId>glean-api-client</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand All @@ -87,33 +88,6 @@ On Windows:
```bash
gradlew.bat publishToMavenLocal -Pskip.signing
```

### Logging
A logging framework/facade has not yet been adopted but is under consideration.

For request and response logging (especially json bodies), call `enableHTTPDebugLogging(boolean)` on the SDK builder like so:
```java
SDK.builder()
.enableHTTPDebugLogging(true)
.build();
```
Example output:
```
Sending request: http://localhost:35123/bearer#global GET
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]}
Received response: (GET http://localhost:35123/bearer#global) 200
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]}
Response body:
{
"authenticated": true,
"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`.

__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 SDK Installation [installation] -->

<!-- Start SDK Example Usage [usage] -->
Expand Down Expand Up @@ -1269,6 +1243,37 @@ public class Application {
```
<!-- End Server Selection [server] -->

<!-- Start Debugging [debug] -->
## 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)
.build();
```
Example output:
```
Sending request: http://localhost:35123/bearer#global GET
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]}
Received response: (GET http://localhost:35123/bearer#global) 200
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]}
Response body:
{
"authenticated": true,
"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`.

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

<!-- Placeholder for Future Speakeasy SDK Sections -->

# Development
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,14 @@ Based on:
### Generated
- [java v0.6.0] .
### Releases
- [Maven Central v0.6.0] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.6.0 - .
- [Maven Central v0.6.0] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.6.0 - .

## 2025-07-11 02:10:35
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.580.2 (2.656.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.7.0] .
### Releases
- [Maven Central v0.7.0] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.7.0 - .
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ publishing {
// https://github.com/gradle/gradle/issues/18619
groupId = "com.glean.api-client"
artifactId = "glean-api-client"
version = "0.6.0"
version = "0.7.0"

from components.java

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
groupId=com.glean.api-client
artifactId=glean-api-client
version=0.6.0
version=0.7.0
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class Activity {
Activity(SDKConfiguration sdkConfiguration) {
this.sdkConfiguration = sdkConfiguration;
}

/**
* Report document activity
*
Expand All @@ -46,14 +45,12 @@ public ActivityRequestBuilder report() {
* @return The response from the API call
* @throws Exception if the API call fails
*/
public ActivityResponse report(
com.glean.api_client.glean_api_client.models.components.Activity request) throws Exception {
public ActivityResponse report(com.glean.api_client.glean_api_client.models.components.Activity request) throws Exception {
RequestOperation<com.glean.api_client.glean_api_client.models.components.Activity, ActivityResponse> operation
= new ActivityOperation( sdkConfiguration);
= new ActivityOperation(sdkConfiguration);
return operation.handleResponse(operation.doRequest(request));
}


/**
* Report client activity
*
Expand Down Expand Up @@ -97,7 +94,7 @@ public FeedbackResponse feedback(
.feedback1(feedback1)
.build();
RequestOperation<FeedbackRequest, FeedbackResponse> operation
= new FeedbackOperation( sdkConfiguration);
= new FeedbackOperation(sdkConfiguration);
return operation.handleResponse(operation.doRequest(request));
}

Expand Down
24 changes: 8 additions & 16 deletions src/main/java/com/glean/api_client/glean_api_client/Agents.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public class Agents {
Agents(SDKConfiguration sdkConfiguration) {
this.sdkConfiguration = sdkConfiguration;
}

/**
* Retrieve an agent
*
Expand Down Expand Up @@ -82,11 +81,10 @@ public GetAgentResponse retrieve(
.agentId(agentId)
.build();
RequestOperation<GetAgentRequest, GetAgentResponse> operation
= new GetAgentOperation( sdkConfiguration);
= new GetAgentOperation(sdkConfiguration);
return operation.handleResponse(operation.doRequest(request));
}


/**
* List an agent's schemas
*
Expand Down Expand Up @@ -131,11 +129,10 @@ public GetAgentSchemasResponse retrieveSchemas(
.agentId(agentId)
.build();
RequestOperation<GetAgentSchemasRequest, GetAgentSchemasResponse> operation
= new GetAgentSchemasOperation( sdkConfiguration);
= new GetAgentSchemasOperation(sdkConfiguration);
return operation.handleResponse(operation.doRequest(request));
}


/**
* Search agents
*
Expand All @@ -156,14 +153,12 @@ public SearchAgentsRequestBuilder list() {
* @return The response from the API call
* @throws Exception if the API call fails
*/
public SearchAgentsResponse list(
SearchAgentsRequest request) throws Exception {
public SearchAgentsResponse list(SearchAgentsRequest request) throws Exception {
RequestOperation<SearchAgentsRequest, SearchAgentsResponse> operation
= new SearchAgentsOperation( sdkConfiguration);
= new SearchAgentsOperation(sdkConfiguration);
return operation.handleResponse(operation.doRequest(request));
}


/**
* Create an agent run and stream the response
*
Expand All @@ -184,14 +179,12 @@ public CreateAndStreamRunRequestBuilder runStream() {
* @return The response from the API call
* @throws Exception if the API call fails
*/
public CreateAndStreamRunResponse runStream(
AgentRunCreate request) throws Exception {
public CreateAndStreamRunResponse runStream(AgentRunCreate request) throws Exception {
RequestOperation<AgentRunCreate, CreateAndStreamRunResponse> operation
= new CreateAndStreamRunOperation( sdkConfiguration);
= new CreateAndStreamRunOperation(sdkConfiguration);
return operation.handleResponse(operation.doRequest(request));
}


/**
* Create an agent run and wait for the response
*
Expand All @@ -212,10 +205,9 @@ public CreateAndWaitRunRequestBuilder run() {
* @return The response from the API call
* @throws Exception if the API call fails
*/
public CreateAndWaitRunResponse run(
AgentRunCreate request) throws Exception {
public CreateAndWaitRunResponse run(AgentRunCreate request) throws Exception {
RequestOperation<AgentRunCreate, CreateAndWaitRunResponse> operation
= new CreateAndWaitRunOperation( sdkConfiguration);
= new CreateAndWaitRunOperation(sdkConfiguration);
return operation.handleResponse(operation.doRequest(request));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public class Announcements {
Announcements(SDKConfiguration sdkConfiguration) {
this.sdkConfiguration = sdkConfiguration;
}

/**
* Create Announcement
*
Expand All @@ -49,14 +48,12 @@ public CreateannouncementRequestBuilder create() {
* @return The response from the API call
* @throws Exception if the API call fails
*/
public CreateannouncementResponse create(
CreateAnnouncementRequest request) throws Exception {
public CreateannouncementResponse create(CreateAnnouncementRequest request) throws Exception {
RequestOperation<CreateAnnouncementRequest, CreateannouncementResponse> operation
= new CreateannouncementOperation( sdkConfiguration);
= new CreateannouncementOperation(sdkConfiguration);
return operation.handleResponse(operation.doRequest(request));
}


/**
* Delete Announcement
*
Expand All @@ -77,14 +74,12 @@ public DeleteannouncementRequestBuilder delete() {
* @return The response from the API call
* @throws Exception if the API call fails
*/
public DeleteannouncementResponse delete(
DeleteAnnouncementRequest request) throws Exception {
public DeleteannouncementResponse delete(DeleteAnnouncementRequest request) throws Exception {
RequestOperation<DeleteAnnouncementRequest, DeleteannouncementResponse> operation
= new DeleteannouncementOperation( sdkConfiguration);
= new DeleteannouncementOperation(sdkConfiguration);
return operation.handleResponse(operation.doRequest(request));
}


/**
* Update Announcement
*
Expand All @@ -105,10 +100,9 @@ public UpdateannouncementRequestBuilder update() {
* @return The response from the API call
* @throws Exception if the API call fails
*/
public UpdateannouncementResponse update(
UpdateAnnouncementRequest request) throws Exception {
public UpdateannouncementResponse update(UpdateAnnouncementRequest request) throws Exception {
RequestOperation<UpdateAnnouncementRequest, UpdateannouncementResponse> operation
= new UpdateannouncementOperation( sdkConfiguration);
= new UpdateannouncementOperation(sdkConfiguration);
return operation.handleResponse(operation.doRequest(request));
}

Expand Down
Loading