Skip to content

Commit 7e9a960

Browse files
authored
chore: make streamed list objects client layer pvt (#266)
* chore: make streamedListObjects client layer pvt * fix: spotless fmt * feat: use disabled annotations instead of comments
1 parent 90c4881 commit 7e9a960

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

examples/streamed-list-objects/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Streamed List Objects Example
22

3+
> **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.
4+
5+
<!--
36
Demonstrates using `StreamedListObjects` to retrieve objects via the streaming API in the Java SDK.
47
58
## What is StreamedListObjects?

examples/streamed-list-objects/src/main/java/dev/openfga/sdk/example/StreamedListObjectsExample.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// NOTE: This example is temporarily commented out as the streamedListObjects API is not yet available for public use.
2+
// It will be enabled in a future release.
3+
4+
/*
15
package dev.openfga.sdk.example;
26
37
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -192,3 +196,4 @@ private WriteAuthorizationModelRequest createAuthorizationModel() {
192196
}
193197
}
194198
}
199+
*/

src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ public CompletableFuture<ClientListObjectsResponse> listObjects(
11311131
* @return CompletableFuture<Void> that completes when streaming finishes
11321132
* @throws FgaInvalidParameterException When the Store ID is null, empty, or whitespace, or consumer is null
11331133
*/
1134-
public CompletableFuture<Void> streamedListObjects(
1134+
CompletableFuture<Void> streamedListObjects(
11351135
ClientListObjectsRequest request, Consumer<StreamedListObjectsResponse> consumer)
11361136
throws FgaInvalidParameterException {
11371137
if (consumer == null) {
@@ -1171,7 +1171,7 @@ public CompletableFuture<Void> streamedListObjects(
11711171
* @return CompletableFuture<Void> that completes when streaming finishes
11721172
* @throws FgaInvalidParameterException When the Store ID is null, empty, or whitespace, or consumer is null
11731173
*/
1174-
public CompletableFuture<Void> streamedListObjects(
1174+
CompletableFuture<Void> streamedListObjects(
11751175
ClientListObjectsRequest request,
11761176
ClientStreamedListObjectsOptions options,
11771177
Consumer<StreamedListObjectsResponse> consumer)
@@ -1211,7 +1211,7 @@ public CompletableFuture<Void> streamedListObjects(
12111211
* @return CompletableFuture<Void> that completes when streaming finishes or exceptionally on error
12121212
* @throws FgaInvalidParameterException When the Store ID is null, empty, or whitespace, or consumer is null
12131213
*/
1214-
public CompletableFuture<Void> streamedListObjects(
1214+
CompletableFuture<Void> streamedListObjects(
12151215
ClientListObjectsRequest request,
12161216
ClientStreamedListObjectsOptions options,
12171217
Consumer<StreamedListObjectsResponse> consumer,

src/test-integration/java/dev/openfga/sdk/api/client/OpenFgaClientIntegrationTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import java.util.concurrent.CompletableFuture;
1515
import org.junit.jupiter.api.BeforeAll;
1616
import org.junit.jupiter.api.BeforeEach;
17+
import org.junit.jupiter.api.Disabled;
1718
import org.junit.jupiter.api.Test;
1819
import org.junit.jupiter.api.TestInstance;
1920
import org.junit.jupiter.api.TestInstance.Lifecycle;
@@ -374,6 +375,7 @@ private String writeAuthModel(String storeId) throws Exception {
374375
}
375376

376377
@Test
378+
@Disabled("streamedListObjects is private for now")
377379
public void streamedListObjects() throws Exception {
378380
// Given - Create a single store for all streaming tests
379381
String storeId = createStore(thisTestName());

src/test/java/dev/openfga/sdk/api/client/StreamedListObjectsTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
import java.util.concurrent.atomic.AtomicInteger;
2525
import java.util.stream.Stream;
2626
import org.junit.jupiter.api.BeforeEach;
27+
import org.junit.jupiter.api.Disabled;
2728
import org.junit.jupiter.api.Test;
2829

2930
/** Tests for streaming list objects functionality with CompletableFuture. */
31+
@Disabled("streamedListObjects is private for now")
3032
public class StreamedListObjectsTest {
3133
private static final String DEFAULT_STORE_ID = "01YCP46JKYM8FJCQ37NMBYHE5X";
3234
private static final String DEFAULT_AUTH_MODEL_ID = "01G5JAVJ41T49E9TT3SKVS7X1J";

0 commit comments

Comments
 (0)