|
47 | 47 | import dev.openfga.sdk.telemetry.Attributes; |
48 | 48 | import dev.openfga.sdk.telemetry.Telemetry; |
49 | 49 | import dev.openfga.sdk.util.Pair; |
| 50 | +import dev.openfga.sdk.util.StringUtil; |
50 | 51 | import java.io.IOException; |
51 | 52 | import java.net.URI; |
52 | 53 | import java.net.http.HttpRequest; |
@@ -127,7 +128,7 @@ private CompletableFuture<ApiResponse<BatchCheckResponse>> batchCheck( |
127 | 128 |
|
128 | 129 | assertParamExists(body, "body", "batchCheck"); |
129 | 130 |
|
130 | | - String path = "/stores/{store_id}/batch-check".replace("{store_id}", ApiClient.urlEncode(storeId.toString())); |
| 131 | + String path = "/stores/{store_id}/batch-check".replace("{store_id}", StringUtil.urlEncode(storeId.toString())); |
131 | 132 |
|
132 | 133 | Map<String, Object> methodParameters = new HashMap<>(); |
133 | 134 | methodParameters.put("storeId", storeId); |
@@ -183,7 +184,7 @@ private CompletableFuture<ApiResponse<CheckResponse>> check( |
183 | 184 |
|
184 | 185 | assertParamExists(body, "body", "check"); |
185 | 186 |
|
186 | | - String path = "/stores/{store_id}/check".replace("{store_id}", ApiClient.urlEncode(storeId.toString())); |
| 187 | + String path = "/stores/{store_id}/check".replace("{store_id}", StringUtil.urlEncode(storeId.toString())); |
187 | 188 |
|
188 | 189 | Map<String, Object> methodParameters = new HashMap<>(); |
189 | 190 | methodParameters.put("storeId", storeId); |
@@ -283,7 +284,7 @@ private CompletableFuture<ApiResponse<Void>> deleteStore(String storeId, Configu |
283 | 284 |
|
284 | 285 | assertParamExists(storeId, "storeId", "deleteStore"); |
285 | 286 |
|
286 | | - String path = "/stores/{store_id}".replace("{store_id}", ApiClient.urlEncode(storeId.toString())); |
| 287 | + String path = "/stores/{store_id}".replace("{store_id}", StringUtil.urlEncode(storeId.toString())); |
287 | 288 |
|
288 | 289 | Map<String, Object> methodParameters = new HashMap<>(); |
289 | 290 | methodParameters.put("storeId", storeId); |
@@ -338,7 +339,7 @@ private CompletableFuture<ApiResponse<ExpandResponse>> expand( |
338 | 339 |
|
339 | 340 | assertParamExists(body, "body", "expand"); |
340 | 341 |
|
341 | | - String path = "/stores/{store_id}/expand".replace("{store_id}", ApiClient.urlEncode(storeId.toString())); |
| 342 | + String path = "/stores/{store_id}/expand".replace("{store_id}", StringUtil.urlEncode(storeId.toString())); |
342 | 343 |
|
343 | 344 | Map<String, Object> methodParameters = new HashMap<>(); |
344 | 345 | methodParameters.put("storeId", storeId); |
@@ -389,7 +390,7 @@ private CompletableFuture<ApiResponse<GetStoreResponse>> getStore(String storeId |
389 | 390 |
|
390 | 391 | assertParamExists(storeId, "storeId", "getStore"); |
391 | 392 |
|
392 | | - String path = "/stores/{store_id}".replace("{store_id}", ApiClient.urlEncode(storeId.toString())); |
| 393 | + String path = "/stores/{store_id}".replace("{store_id}", StringUtil.urlEncode(storeId.toString())); |
393 | 394 |
|
394 | 395 | Map<String, Object> methodParameters = new HashMap<>(); |
395 | 396 | methodParameters.put("storeId", storeId); |
@@ -444,7 +445,7 @@ private CompletableFuture<ApiResponse<ListObjectsResponse>> listObjects( |
444 | 445 |
|
445 | 446 | assertParamExists(body, "body", "listObjects"); |
446 | 447 |
|
447 | | - String path = "/stores/{store_id}/list-objects".replace("{store_id}", ApiClient.urlEncode(storeId.toString())); |
| 448 | + String path = "/stores/{store_id}/list-objects".replace("{store_id}", StringUtil.urlEncode(storeId.toString())); |
448 | 449 |
|
449 | 450 | Map<String, Object> methodParameters = new HashMap<>(); |
450 | 451 | methodParameters.put("storeId", storeId); |
@@ -551,7 +552,7 @@ private CompletableFuture<ApiResponse<ListUsersResponse>> listUsers( |
551 | 552 |
|
552 | 553 | assertParamExists(body, "body", "listUsers"); |
553 | 554 |
|
554 | | - String path = "/stores/{store_id}/list-users".replace("{store_id}", ApiClient.urlEncode(storeId.toString())); |
| 555 | + String path = "/stores/{store_id}/list-users".replace("{store_id}", StringUtil.urlEncode(storeId.toString())); |
555 | 556 |
|
556 | 557 | Map<String, Object> methodParameters = new HashMap<>(); |
557 | 558 | methodParameters.put("storeId", storeId); |
@@ -607,7 +608,7 @@ private CompletableFuture<ApiResponse<ReadResponse>> read( |
607 | 608 |
|
608 | 609 | assertParamExists(body, "body", "read"); |
609 | 610 |
|
610 | | - String path = "/stores/{store_id}/read".replace("{store_id}", ApiClient.urlEncode(storeId.toString())); |
| 611 | + String path = "/stores/{store_id}/read".replace("{store_id}", StringUtil.urlEncode(storeId.toString())); |
611 | 612 |
|
612 | 613 | Map<String, Object> methodParameters = new HashMap<>(); |
613 | 614 | methodParameters.put("storeId", storeId); |
@@ -664,8 +665,8 @@ private CompletableFuture<ApiResponse<ReadAssertionsResponse>> readAssertions( |
664 | 665 | assertParamExists(authorizationModelId, "authorizationModelId", "readAssertions"); |
665 | 666 |
|
666 | 667 | String path = "/stores/{store_id}/assertions/{authorization_model_id}" |
667 | | - .replace("{store_id}", ApiClient.urlEncode(storeId.toString())) |
668 | | - .replace("{authorization_model_id}", ApiClient.urlEncode(authorizationModelId.toString())); |
| 668 | + .replace("{store_id}", StringUtil.urlEncode(storeId.toString())) |
| 669 | + .replace("{authorization_model_id}", StringUtil.urlEncode(authorizationModelId.toString())); |
669 | 670 |
|
670 | 671 | Map<String, Object> methodParameters = new HashMap<>(); |
671 | 672 | methodParameters.put("storeId", storeId); |
@@ -722,8 +723,8 @@ private CompletableFuture<ApiResponse<ReadAuthorizationModelResponse>> readAutho |
722 | 723 | assertParamExists(id, "id", "readAuthorizationModel"); |
723 | 724 |
|
724 | 725 | String path = "/stores/{store_id}/authorization-models/{id}" |
725 | | - .replace("{store_id}", ApiClient.urlEncode(storeId.toString())) |
726 | | - .replace("{id}", ApiClient.urlEncode(id.toString())); |
| 726 | + .replace("{store_id}", StringUtil.urlEncode(storeId.toString())) |
| 727 | + .replace("{id}", StringUtil.urlEncode(id.toString())); |
727 | 728 |
|
728 | 729 | Map<String, Object> methodParameters = new HashMap<>(); |
729 | 730 | methodParameters.put("storeId", storeId); |
@@ -787,7 +788,7 @@ private CompletableFuture<ApiResponse<ReadAuthorizationModelsResponse>> readAuth |
787 | 788 | assertParamExists(storeId, "storeId", "readAuthorizationModels"); |
788 | 789 |
|
789 | 790 | String path = "/stores/{store_id}/authorization-models" |
790 | | - .replace("{store_id}", ApiClient.urlEncode(storeId.toString())); |
| 791 | + .replace("{store_id}", StringUtil.urlEncode(storeId.toString())); |
791 | 792 | path = pathWithParams(path, "page_size", pageSize, "continuation_token", continuationToken); |
792 | 793 |
|
793 | 794 | Map<String, Object> methodParameters = new HashMap<>(); |
@@ -869,7 +870,7 @@ private CompletableFuture<ApiResponse<ReadChangesResponse>> readChanges( |
869 | 870 |
|
870 | 871 | assertParamExists(storeId, "storeId", "readChanges"); |
871 | 872 |
|
872 | | - String path = "/stores/{store_id}/changes".replace("{store_id}", ApiClient.urlEncode(storeId.toString())); |
| 873 | + String path = "/stores/{store_id}/changes".replace("{store_id}", StringUtil.urlEncode(storeId.toString())); |
873 | 874 | path = pathWithParams( |
874 | 875 | path, |
875 | 876 | "type", |
@@ -933,7 +934,7 @@ private CompletableFuture<ApiResponse<Object>> write(String storeId, WriteReques |
933 | 934 |
|
934 | 935 | assertParamExists(body, "body", "write"); |
935 | 936 |
|
936 | | - String path = "/stores/{store_id}/write".replace("{store_id}", ApiClient.urlEncode(storeId.toString())); |
| 937 | + String path = "/stores/{store_id}/write".replace("{store_id}", StringUtil.urlEncode(storeId.toString())); |
937 | 938 |
|
938 | 939 | Map<String, Object> methodParameters = new HashMap<>(); |
939 | 940 | methodParameters.put("storeId", storeId); |
@@ -998,8 +999,8 @@ private CompletableFuture<ApiResponse<Void>> writeAssertions( |
998 | 999 | assertParamExists(body, "body", "writeAssertions"); |
999 | 1000 |
|
1000 | 1001 | String path = "/stores/{store_id}/assertions/{authorization_model_id}" |
1001 | | - .replace("{store_id}", ApiClient.urlEncode(storeId.toString())) |
1002 | | - .replace("{authorization_model_id}", ApiClient.urlEncode(authorizationModelId.toString())); |
| 1002 | + .replace("{store_id}", StringUtil.urlEncode(storeId.toString())) |
| 1003 | + .replace("{authorization_model_id}", StringUtil.urlEncode(authorizationModelId.toString())); |
1003 | 1004 |
|
1004 | 1005 | Map<String, Object> methodParameters = new HashMap<>(); |
1005 | 1006 | methodParameters.put("storeId", storeId); |
@@ -1057,7 +1058,7 @@ private CompletableFuture<ApiResponse<WriteAuthorizationModelResponse>> writeAut |
1057 | 1058 | assertParamExists(body, "body", "writeAuthorizationModel"); |
1058 | 1059 |
|
1059 | 1060 | String path = "/stores/{store_id}/authorization-models" |
1060 | | - .replace("{store_id}", ApiClient.urlEncode(storeId.toString())); |
| 1061 | + .replace("{store_id}", StringUtil.urlEncode(storeId.toString())); |
1061 | 1062 |
|
1062 | 1063 | Map<String, Object> methodParameters = new HashMap<>(); |
1063 | 1064 | methodParameters.put("storeId", storeId); |
|
0 commit comments