Skip to content

Commit f01bd0c

Browse files
committed
chore: run format
1 parent 958503e commit f01bd0c

File tree

5 files changed

+31
-38
lines changed

5 files changed

+31
-38
lines changed

src/main/java/dev/openfga/sdk/constants/FgaConstants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
public final class FgaConstants {
2020

2121
/** Version of the OpenFGA Java SDK. */
22-
public static final String SDK_VERSION = "0.9.1";
22+
public static final String SDK_VERSION = "0.9.2";
2323

2424
/** User agent used in HTTP requests. */
25-
public static final String USER_AGENT = "openfga-sdk java/0.9.1";
25+
public static final String USER_AGENT = "openfga-sdk java/0.9.2";
2626

2727
/** Example API domain for documentation/tests. */
2828
public static final String SAMPLE_BASE_DOMAIN = "fga.example";

src/main/java/dev/openfga/sdk/util/Pair.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ public static Optional<Pair> of(String name, Object value) {
4747
return Optional.of(new Pair(name, value.toString()));
4848
}
4949
}
50-

src/main/java/dev/openfga/sdk/util/Validation.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ public static void assertParamExists(Object obj, String name, String context) th
1313
}
1414
}
1515
}
16-

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ public void readAuthorizationModels_withHeaders() throws Exception {
285285
@Test
286286
public void writeAuthorizationModel_withHeaders() throws Exception {
287287
// Given
288-
String postUrl = String.format("%s/stores/%s/authorization-models", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID);
288+
String postUrl =
289+
String.format("%s/stores/%s/authorization-models", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID);
289290
String expectedBody =
290291
"{\"type_definitions\":[{\"type\":\"document\",\"relations\":{},\"metadata\":null}],\"schema_version\":\"1.1\",\"conditions\":{}}";
291292
String responseBody = String.format("{\"authorization_model_id\":\"%s\"}", DEFAULT_AUTH_MODEL_ID);

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

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,8 @@ public void readChanges() throws Exception {
789789
@Test
790790
public void writeAuthorizationModelTest() throws Exception {
791791
// Given
792-
String postUrl = String.format("%s/stores/%s/authorization-models", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID);
792+
String postUrl =
793+
String.format("%s/stores/%s/authorization-models", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID);
793794
String expectedBody =
794795
"{\"type_definitions\":[{\"type\":\"document\",\"relations\":{},\"metadata\":null}],\"schema_version\":\"1.1\",\"conditions\":{}}";
795796
String responseBody = String.format("{\"authorization_model_id\":\"%s\"}", DEFAULT_AUTH_MODEL_ID);
@@ -838,7 +839,8 @@ public void writeAuthorizationModel_bodyRequired() {
838839
@Test
839840
public void writeAuthorizationModel_400() throws Exception {
840841
// Given
841-
String postUrl = String.format("%s/stores/%s/authorization-models", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID);
842+
String postUrl =
843+
String.format("%s/stores/%s/authorization-models", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID);
842844
mockHttpClient
843845
.onPost(postUrl)
844846
.doReturn(400, "{\"code\":\"validation_error\",\"message\":\"Generic validation error\"}");
@@ -860,7 +862,8 @@ public void writeAuthorizationModel_400() throws Exception {
860862
@Test
861863
public void writeAuthorizationModel_404() {
862864
// Given
863-
String postUrl = String.format("%s/stores/%s/authorization-models", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID);
865+
String postUrl =
866+
String.format("%s/stores/%s/authorization-models", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID);
864867
mockHttpClient
865868
.onPost(postUrl)
866869
.doReturn(404, "{\"code\":\"undefined_endpoint\",\"message\":\"Endpoint not enabled\"}");
@@ -881,7 +884,8 @@ public void writeAuthorizationModel_404() {
881884
@Test
882885
public void writeAuthorizationModel_500() {
883886
// Given
884-
String postUrl = String.format("%s/stores/%s/authorization-models", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID);
887+
String postUrl =
888+
String.format("%s/stores/%s/authorization-models", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID);
885889
mockHttpClient
886890
.onPost(postUrl)
887891
.doReturn(500, "{\"code\":\"internal_error\",\"message\":\"Internal Server Error\"}");
@@ -908,9 +912,7 @@ public void readAuthorizationModelTest() throws Exception {
908912
// Given
909913
String getUrl = String.format(
910914
"%s/stores/%s/authorization-models/%s",
911-
FgaConstants.TEST_API_URL,
912-
DEFAULT_STORE_ID,
913-
DEFAULT_AUTH_MODEL_ID);
915+
FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID);
914916
String getResponse = String.format(
915917
"{\"authorization_model\":{\"id\":\"%s\",\"schema_version\":\"%s\"}}",
916918
DEFAULT_AUTH_MODEL_ID, DEFAULT_SCHEMA_VERSION);
@@ -935,9 +937,7 @@ public void readAuthorizationModelTest_withOptions() throws Exception {
935937
new ClientReadAuthorizationModelOptions().authorizationModelId(authorizationModelId);
936938
String getUrl = String.format(
937939
"%s/stores/%s/authorization-models/%s",
938-
FgaConstants.TEST_API_URL,
939-
DEFAULT_STORE_ID,
940-
authorizationModelId);
940+
FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, authorizationModelId);
941941
String getResponse = String.format(
942942
"{\"authorization_model\":{\"id\":\"%s\",\"schema_version\":\"%s\"}}",
943943
authorizationModelId, DEFAULT_SCHEMA_VERSION);
@@ -988,9 +988,7 @@ public void readAuthorizationModel_400() {
988988
// Given
989989
String getUrl = String.format(
990990
"%s/stores/%s/authorization-models/%s",
991-
FgaConstants.TEST_API_URL,
992-
DEFAULT_STORE_ID,
993-
DEFAULT_AUTH_MODEL_ID);
991+
FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID);
994992
mockHttpClient
995993
.onGet(getUrl)
996994
.doReturn(400, "{\"code\":\"validation_error\",\"message\":\"Generic validation error\"}");
@@ -1013,9 +1011,7 @@ public void readAuthorizationModel_404() throws Exception {
10131011
// Given
10141012
String getUrl = String.format(
10151013
"%s/stores/%s/authorization-models/%s",
1016-
FgaConstants.TEST_API_URL,
1017-
DEFAULT_STORE_ID,
1018-
DEFAULT_AUTH_MODEL_ID);
1014+
FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID);
10191015
mockHttpClient
10201016
.onGet(getUrl)
10211017
.doReturn(404, "{\"code\":\"undefined_endpoint\",\"message\":\"Endpoint not enabled\"}");
@@ -1037,9 +1033,7 @@ public void readAuthorizationModel_500() throws Exception {
10371033
// Given
10381034
String getUrl = String.format(
10391035
"%s/stores/%s/authorization-models/%s",
1040-
FgaConstants.TEST_API_URL,
1041-
DEFAULT_STORE_ID,
1042-
DEFAULT_AUTH_MODEL_ID);
1036+
FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID);
10431037
mockHttpClient
10441038
.onGet(getUrl)
10451039
.doReturn(500, "{\"code\":\"internal_error\",\"message\":\"Internal Server Error\"}");
@@ -2919,8 +2913,8 @@ public void listUsersTest() throws Exception {
29192913
@Test
29202914
public void readAssertionsTest() throws Exception {
29212915
// Given
2922-
String getUrl = String.format(
2923-
String.format("%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
2916+
String getUrl = String.format(String.format(
2917+
"%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
29242918
String responseBody = String.format(
29252919
"{\"assertions\":[{\"tuple_key\":{\"user\":\"%s\",\"relation\":\"%s\",\"object\":\"%s\"},\"expectation\":true}]}",
29262920
DEFAULT_USER, DEFAULT_RELATION, DEFAULT_OBJECT);
@@ -2973,8 +2967,8 @@ public void readAssertions_authModelIdRequired() {
29732967
@Test
29742968
public void readAssertions_400() throws Exception {
29752969
// Given
2976-
String getUrl = String.format(
2977-
String.format("%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
2970+
String getUrl = String.format(String.format(
2971+
"%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
29782972
mockHttpClient
29792973
.onGet(getUrl)
29802974
.doReturn(400, "{\"code\":\"validation_error\",\"message\":\"Generic validation error\"}");
@@ -2995,8 +2989,8 @@ public void readAssertions_400() throws Exception {
29952989
@Test
29962990
public void readAssertions_404() throws Exception {
29972991
// Given
2998-
String getUrl = String.format(
2999-
String.format("%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
2992+
String getUrl = String.format(String.format(
2993+
"%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
30002994
mockHttpClient
30012995
.onGet(getUrl)
30022996
.doReturn(404, "{\"code\":\"undefined_endpoint\",\"message\":\"Endpoint not enabled\"}");
@@ -3016,8 +3010,8 @@ public void readAssertions_404() throws Exception {
30163010
@Test
30173011
public void readAssertions_500() throws Exception {
30183012
// Given
3019-
String getUrl = String.format(
3020-
String.format("%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
3013+
String getUrl = String.format(String.format(
3014+
"%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
30213015
mockHttpClient
30223016
.onGet(getUrl)
30233017
.doReturn(500, "{\"code\":\"internal_error\",\"message\":\"Internal Server Error\"}");
@@ -3040,8 +3034,8 @@ public void readAssertions_500() throws Exception {
30403034
@Test
30413035
public void writeAssertionsTest() throws Exception {
30423036
// Given
3043-
String putUrl = String.format(
3044-
String.format("%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
3037+
String putUrl = String.format(String.format(
3038+
"%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
30453039
String expectedBody = String.format(
30463040
"{\"assertions\":[{\"tuple_key\":{\"object\":\"%s\",\"relation\":\"%s\",\"user\":\"%s\"},\"expectation\":true,\"contextual_tuples\":[],\"context\":null}]}",
30473041
DEFAULT_OBJECT, DEFAULT_RELATION, DEFAULT_USER);
@@ -3092,8 +3086,8 @@ public void writeAssertions_authModelIdRequired() {
30923086
@Test
30933087
public void writeAssertions_400() throws Exception {
30943088
// Given
3095-
String putUrl = String.format(
3096-
String.format("%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
3089+
String putUrl = String.format(String.format(
3090+
"%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
30973091
mockHttpClient
30983092
.onPut(putUrl)
30993093
.doReturn(400, "{\"code\":\"validation_error\",\"message\":\"Generic validation error\"}");
@@ -3114,8 +3108,8 @@ public void writeAssertions_400() throws Exception {
31143108
@Test
31153109
public void writeAssertions_404() throws Exception {
31163110
// Given
3117-
String putUrl = String.format(
3118-
String.format("%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
3111+
String putUrl = String.format(String.format(
3112+
"%s/stores/%s/assertions/%s", FgaConstants.TEST_API_URL, DEFAULT_STORE_ID, DEFAULT_AUTH_MODEL_ID));
31193113
mockHttpClient
31203114
.onPut(putUrl)
31213115
.doReturn(404, "{\"code\":\"undefined_endpoint\",\"message\":\"Endpoint not enabled\"}");

0 commit comments

Comments
 (0)