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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/streamed-list-objects/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Streamed List Objects Example

> **NOTE:** This example is temporarily disabled as the `streamedListObjects` API is not yet available for public use. It will be enabled in a future release.

<!--
Demonstrates using `StreamedListObjects` to retrieve objects via the streaming API in the Java SDK.

## What is StreamedListObjects?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// NOTE: This example is temporarily commented out as the streamedListObjects API is not yet available for public use.
// It will be enabled in a future release.

/*
package dev.openfga.sdk.example;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down Expand Up @@ -192,3 +196,4 @@ private WriteAuthorizationModelRequest createAuthorizationModel() {
}
}
}
*/
6 changes: 3 additions & 3 deletions src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ public CompletableFuture<ClientListObjectsResponse> listObjects(
* @return CompletableFuture<Void> that completes when streaming finishes
* @throws FgaInvalidParameterException When the Store ID is null, empty, or whitespace, or consumer is null
*/
public CompletableFuture<Void> streamedListObjects(
CompletableFuture<Void> streamedListObjects(
ClientListObjectsRequest request, Consumer<StreamedListObjectsResponse> consumer)
throws FgaInvalidParameterException {
if (consumer == null) {
Expand Down Expand Up @@ -1171,7 +1171,7 @@ public CompletableFuture<Void> streamedListObjects(
* @return CompletableFuture<Void> that completes when streaming finishes
* @throws FgaInvalidParameterException When the Store ID is null, empty, or whitespace, or consumer is null
*/
public CompletableFuture<Void> streamedListObjects(
CompletableFuture<Void> streamedListObjects(
ClientListObjectsRequest request,
ClientStreamedListObjectsOptions options,
Consumer<StreamedListObjectsResponse> consumer)
Expand Down Expand Up @@ -1211,7 +1211,7 @@ public CompletableFuture<Void> streamedListObjects(
* @return CompletableFuture<Void> that completes when streaming finishes or exceptionally on error
* @throws FgaInvalidParameterException When the Store ID is null, empty, or whitespace, or consumer is null
*/
public CompletableFuture<Void> streamedListObjects(
CompletableFuture<Void> streamedListObjects(
ClientListObjectsRequest request,
ClientStreamedListObjectsOptions options,
Consumer<StreamedListObjectsResponse> consumer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.util.concurrent.CompletableFuture;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestInstance.Lifecycle;
Expand Down Expand Up @@ -374,6 +375,7 @@ private String writeAuthModel(String storeId) throws Exception {
}

@Test
@Disabled("streamedListObjects is private for now")
public void streamedListObjects() throws Exception {
// Given - Create a single store for all streaming tests
String storeId = createStore(thisTestName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Stream;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

/** Tests for streaming list objects functionality with CompletableFuture. */
@Disabled("streamedListObjects is private for now")
public class StreamedListObjectsTest {
private static final String DEFAULT_STORE_ID = "01YCP46JKYM8FJCQ37NMBYHE5X";
private static final String DEFAULT_AUTH_MODEL_ID = "01G5JAVJ41T49E9TT3SKVS7X1J";
Expand Down
Loading