diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index f50ab21..228aa29 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -1,5 +1,7 @@ **/ServerConfiguration.java **/ServerVariable.java +**/JSON.java +**/client/Configuration.java src/main/AndroidManifest.xml build.sbt pom.xml diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 08f0b5a..e931a85 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -79,15 +79,13 @@ src/main/java/dev/openfga/sdk/api/client/ApiBearerToken.java src/main/java/dev/openfga/sdk/api/client/ApiClient.java src/main/java/dev/openfga/sdk/api/client/ApiException.java src/main/java/dev/openfga/sdk/api/client/ApiResponse.java -src/main/java/dev/openfga/sdk/api/client/BaseConfiguration.java src/main/java/dev/openfga/sdk/api/client/ClientCredentials.java -src/main/java/dev/openfga/sdk/api/client/Configuration.java -src/main/java/dev/openfga/sdk/api/client/Configuration.java -src/main/java/dev/openfga/sdk/api/client/ConfigurationOverride.java src/main/java/dev/openfga/sdk/api/client/CredentialsMethod.java -src/main/java/dev/openfga/sdk/api/client/JSON.java src/main/java/dev/openfga/sdk/api/client/Pair.java src/main/java/dev/openfga/sdk/api/client/RFC3339DateFormat.java +src/main/java/dev/openfga/sdk/api/configuration/BaseConfiguration.java +src/main/java/dev/openfga/sdk/api/configuration/Configuration.java +src/main/java/dev/openfga/sdk/api/configuration/ConfigurationOverride.java src/main/java/dev/openfga/sdk/api/model/AbstractOpenApiSchema.java src/main/java/dev/openfga/sdk/api/model/Any.java src/main/java/dev/openfga/sdk/api/model/Assertion.java @@ -149,7 +147,7 @@ src/test-integration/java/dev/openfga/sdk/api/OpenFgaApiIntegrationTest.java src/test/java/dev/openfga/sdk/api/OpenFgaApiTest.java src/test/java/dev/openfga/sdk/api/OpenFgaApiTest.java src/test/java/dev/openfga/sdk/api/client/ClientCredentialsTest.java -src/test/java/dev/openfga/sdk/api/client/ConfigurationTest.java +src/test/java/dev/openfga/sdk/api/configuration/ConfigurationTest.java src/test/java/dev/openfga/sdk/api/model/AnyTest.java src/test/java/dev/openfga/sdk/api/model/AssertionTest.java src/test/java/dev/openfga/sdk/api/model/AuthorizationModelTest.java diff --git a/README.md b/README.md index 044db3e..f2213ba 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Discord Server](https://img.shields.io/discord/759188666072825867?color=7289da&logo=discord "Discord Server")](https://discord.gg/8naAwJfWN6) [![Twitter](https://img.shields.io/twitter/follow/openfga?color=%23179CF0&logo=twitter&style=flat-square "@openfga on Twitter")](https://twitter.com/openfga) -This is an autogenerated java SDK for OpenFGA. It provides a wrapper around the [OpenFGA API definition](https://openfga.dev/api). +This is an autogenerated Java SDK for OpenFGA. It provides a wrapper around the [OpenFGA API definition](https://openfga.dev/api). ## Table of Contents diff --git a/build.gradle b/build.gradle index 593e9d4..f7d745e 100644 --- a/build.gradle +++ b/build.gradle @@ -38,7 +38,6 @@ javadoc { ext { jackson_version = "2.14.1" - jakarta_annotation_version = "1.3.5" junit_version = "5.7.1" } @@ -49,7 +48,6 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "org.openapitools:jackson-databind-nullable:0.2.1" - implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } testing { diff --git a/docs/OpenFgaApi.md b/docs/OpenFgaApi.md index 9b9fc08..fda20be 100644 --- a/docs/OpenFgaApi.md +++ b/docs/OpenFgaApi.md @@ -51,7 +51,7 @@ The Check API queries to check if the user has a certain relationship with an ob // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -123,7 +123,7 @@ The Check API queries to check if the user has a certain relationship with an ob import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -204,7 +204,7 @@ Create a unique OpenFGA store which will be used to store authorization models a // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -274,7 +274,7 @@ Create a unique OpenFGA store which will be used to store authorization models a import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -353,7 +353,7 @@ Delete an OpenFGA store. This does not delete the data associated with the store // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -422,7 +422,7 @@ Delete an OpenFGA store. This does not delete the data associated with the store import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -500,7 +500,7 @@ The Expand API will return all users and usersets that have certain relationship // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -572,7 +572,7 @@ The Expand API will return all users and usersets that have certain relationship import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -653,7 +653,7 @@ Returns an OpenFGA store by its identifier // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -723,7 +723,7 @@ Returns an OpenFGA store by its identifier import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -802,7 +802,7 @@ The ListObjects API returns a list of all the objects of the given type that the // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -874,7 +874,7 @@ The ListObjects API returns a list of all the objects of the given type that the import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -955,7 +955,7 @@ Returns a paginated list of OpenFGA stores and a continuation token to get addit // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1027,7 +1027,7 @@ Returns a paginated list of OpenFGA stores and a continuation token to get addit import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1100,7 +1100,7 @@ No authorization required Get tuples from the store that matches a query, without following userset rewrite rules -The Read API will return the tuples for a certain store that match a query filter specified in the body of the request. It is different from the `/stores/{store_id}/expand` API in that it only returns relationship tuples that are stored in the system and satisfy the query. In the body: 1. `tuple_key` is optional. If not specified, it will return all tuples in the store. 2. `tuple_key.object` is mandatory if `tuple_key` is specified. It can be a full object (e.g., `type:object_id`) or type only (e.g., `type:`). 3. `tuple_key.user` is mandatory if tuple_key is specified in the case the `tuple_key.object` is a type only. ## Examples ### Query for all objects in a type definition To query for all objects that `user:bob` has `reader` relationship in the `document` type definition, call read API with body of ```json { \"tuple_key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:\" } } ``` The API will return tuples and a continuation token, something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `user:bob` has a `reader` relationship with 1 document `document:2021-budget`. Note that this API, unlike the List Objects API, does not evaluate the tuples in the store. The continuation token will be empty if there are no more tuples to query.### Query for all stored relationship tuples that have a particular relation and object To query for all users that have `reader` relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\", \"relation\": \"reader\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`). Note that, even if the model said that all `writers` are also `readers`, the API will not return writers such as `user:anne` because it only returns tuples and does not evaluate them. ### Query for all users with all relationships for a particular document To query for all users that have any relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:anne\", \"relation\": \"writer\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-05T13:42:12.356Z\" }, { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`) and 1 `writer` (`user:anne`). +The Read API will return the tuples for a certain store that match a query filter specified in the body of the request. It is different from the `/stores/{store_id}/expand` API in that it only returns relationship tuples that are stored in the system and satisfy the query. In the body: 1. `tuple_key` is optional. If not specified, it will return all tuples in the store. 2. `tuple_key.object` is mandatory if `tuple_key` is specified. It can be a full object (e.g., `type:object_id`) or type only (e.g., `type:`). 3. `tuple_key.user` is mandatory if tuple_key is specified in the case the `tuple_key.object` is a type only. ## Examples ### Query for all objects in a type definition To query for all objects that `user:bob` has `reader` relationship in the `document` type definition, call read API with body of ```json { \"tuple_key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:\" } } ``` The API will return tuples and a continuation token, something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `user:bob` has a `reader` relationship with 1 document `document:2021-budget`. Note that this API, unlike the List Objects API, does not evaluate the tuples in the store. The continuation token will be empty if there are no more tuples to query. ### Query for all stored relationship tuples that have a particular relation and object To query for all users that have `reader` relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\", \"relation\": \"reader\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`). Note that, even if the model said that all `writers` are also `readers`, the API will not return writers such as `user:anne` because it only returns tuples and does not evaluate them. ### Query for all users with all relationships for a particular document To query for all users that have any relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:anne\", \"relation\": \"writer\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-05T13:42:12.356Z\" }, { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`) and 1 `writer` (`user:anne`). ### Example @@ -1108,7 +1108,7 @@ The Read API will return the tuples for a certain store that match a query filte // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1171,7 +1171,7 @@ No authorization required Get tuples from the store that matches a query, without following userset rewrite rules -The Read API will return the tuples for a certain store that match a query filter specified in the body of the request. It is different from the `/stores/{store_id}/expand` API in that it only returns relationship tuples that are stored in the system and satisfy the query. In the body: 1. `tuple_key` is optional. If not specified, it will return all tuples in the store. 2. `tuple_key.object` is mandatory if `tuple_key` is specified. It can be a full object (e.g., `type:object_id`) or type only (e.g., `type:`). 3. `tuple_key.user` is mandatory if tuple_key is specified in the case the `tuple_key.object` is a type only. ## Examples ### Query for all objects in a type definition To query for all objects that `user:bob` has `reader` relationship in the `document` type definition, call read API with body of ```json { \"tuple_key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:\" } } ``` The API will return tuples and a continuation token, something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `user:bob` has a `reader` relationship with 1 document `document:2021-budget`. Note that this API, unlike the List Objects API, does not evaluate the tuples in the store. The continuation token will be empty if there are no more tuples to query.### Query for all stored relationship tuples that have a particular relation and object To query for all users that have `reader` relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\", \"relation\": \"reader\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`). Note that, even if the model said that all `writers` are also `readers`, the API will not return writers such as `user:anne` because it only returns tuples and does not evaluate them. ### Query for all users with all relationships for a particular document To query for all users that have any relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:anne\", \"relation\": \"writer\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-05T13:42:12.356Z\" }, { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`) and 1 `writer` (`user:anne`). +The Read API will return the tuples for a certain store that match a query filter specified in the body of the request. It is different from the `/stores/{store_id}/expand` API in that it only returns relationship tuples that are stored in the system and satisfy the query. In the body: 1. `tuple_key` is optional. If not specified, it will return all tuples in the store. 2. `tuple_key.object` is mandatory if `tuple_key` is specified. It can be a full object (e.g., `type:object_id`) or type only (e.g., `type:`). 3. `tuple_key.user` is mandatory if tuple_key is specified in the case the `tuple_key.object` is a type only. ## Examples ### Query for all objects in a type definition To query for all objects that `user:bob` has `reader` relationship in the `document` type definition, call read API with body of ```json { \"tuple_key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:\" } } ``` The API will return tuples and a continuation token, something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `user:bob` has a `reader` relationship with 1 document `document:2021-budget`. Note that this API, unlike the List Objects API, does not evaluate the tuples in the store. The continuation token will be empty if there are no more tuples to query. ### Query for all stored relationship tuples that have a particular relation and object To query for all users that have `reader` relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\", \"relation\": \"reader\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`). Note that, even if the model said that all `writers` are also `readers`, the API will not return writers such as `user:anne` because it only returns tuples and does not evaluate them. ### Query for all users with all relationships for a particular document To query for all users that have any relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:anne\", \"relation\": \"writer\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-05T13:42:12.356Z\" }, { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`) and 1 `writer` (`user:anne`). ### Example @@ -1180,7 +1180,7 @@ The Read API will return the tuples for a certain store that match a query filte import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1261,7 +1261,7 @@ The ReadAssertions API will return, for a given authorization model id, all the // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1333,7 +1333,7 @@ The ReadAssertions API will return, for a given authorization model id, all the import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1414,7 +1414,7 @@ The ReadAuthorizationModel API returns an authorization model by its identifier. // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1486,7 +1486,7 @@ The ReadAuthorizationModel API returns an authorization model by its identifier. import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1567,7 +1567,7 @@ The ReadAuthorizationModels API will return all the authorization models for a c // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1641,7 +1641,7 @@ The ReadAuthorizationModels API will return all the authorization models for a c import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1724,7 +1724,7 @@ The ReadChanges API will return a paginated list of tuple changes (additions and // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1800,7 +1800,7 @@ The ReadChanges API will return a paginated list of tuple changes (additions and import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1885,7 +1885,7 @@ The Write API will update the tuples for a certain store. Tuples and type defini // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -1957,7 +1957,7 @@ The Write API will update the tuples for a certain store. Tuples and type defini import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -2038,7 +2038,7 @@ The WriteAssertions API will upsert new assertions for an authorization model id // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -2111,7 +2111,7 @@ The WriteAssertions API will upsert new assertions for an authorization model id import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -2193,7 +2193,7 @@ The WriteAuthorizationModel API will add a new authorization model to a store. E // Import classes: import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; @@ -2265,7 +2265,7 @@ The WriteAuthorizationModel API will add a new authorization model to a store. E import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; +import dev.openfga.sdk.api.configuration.Configuration; import dev.openfga.sdk.api.client.models.*; import dev.openfga.sdk.api.OpenFgaApi; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/dev/openfga/sdk/api/OpenFgaApi.java b/src/main/java/dev/openfga/sdk/api/OpenFgaApi.java index ceeda75..158a37f 100644 --- a/src/main/java/dev/openfga/sdk/api/OpenFgaApi.java +++ b/src/main/java/dev/openfga/sdk/api/OpenFgaApi.java @@ -17,9 +17,9 @@ import dev.openfga.sdk.api.client.ApiClient; import dev.openfga.sdk.api.client.ApiException; import dev.openfga.sdk.api.client.ApiResponse; -import dev.openfga.sdk.api.client.Configuration; -import dev.openfga.sdk.api.client.ConfigurationOverride; import dev.openfga.sdk.api.client.Pair; +import dev.openfga.sdk.api.configuration.Configuration; +import dev.openfga.sdk.api.configuration.ConfigurationOverride; import dev.openfga.sdk.api.model.CheckRequest; import dev.openfga.sdk.api.model.CheckResponse; import dev.openfga.sdk.api.model.CreateStoreRequest; @@ -54,9 +54,6 @@ import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class OpenFgaApi { private final HttpClient memberVarHttpClient; private final ObjectMapper memberVarObjectMapper; @@ -1112,7 +1109,7 @@ private HttpRequest.Builder listStoresRequestBuilder( /** * Get tuples from the store that matches a query, without following userset rewrite rules - * The Read API will return the tuples for a certain store that match a query filter specified in the body of the request. It is different from the `/stores/{store_id}/expand` API in that it only returns relationship tuples that are stored in the system and satisfy the query. In the body: 1. `tuple_key` is optional. If not specified, it will return all tuples in the store. 2. `tuple_key.object` is mandatory if `tuple_key` is specified. It can be a full object (e.g., `type:object_id`) or type only (e.g., `type:`). 3. `tuple_key.user` is mandatory if tuple_key is specified in the case the `tuple_key.object` is a type only. ## Examples ### Query for all objects in a type definition To query for all objects that `user:bob` has `reader` relationship in the `document` type definition, call read API with body of ```json { \"tuple_key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:\" } } ``` The API will return tuples and a continuation token, something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `user:bob` has a `reader` relationship with 1 document `document:2021-budget`. Note that this API, unlike the List Objects API, does not evaluate the tuples in the store. The continuation token will be empty if there are no more tuples to query.### Query for all stored relationship tuples that have a particular relation and object To query for all users that have `reader` relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\", \"relation\": \"reader\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`). Note that, even if the model said that all `writers` are also `readers`, the API will not return writers such as `user:anne` because it only returns tuples and does not evaluate them. ### Query for all users with all relationships for a particular document To query for all users that have any relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:anne\", \"relation\": \"writer\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-05T13:42:12.356Z\" }, { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`) and 1 `writer` (`user:anne`). + * The Read API will return the tuples for a certain store that match a query filter specified in the body of the request. It is different from the `/stores/{store_id}/expand` API in that it only returns relationship tuples that are stored in the system and satisfy the query. In the body: 1. `tuple_key` is optional. If not specified, it will return all tuples in the store. 2. `tuple_key.object` is mandatory if `tuple_key` is specified. It can be a full object (e.g., `type:object_id`) or type only (e.g., `type:`). 3. `tuple_key.user` is mandatory if tuple_key is specified in the case the `tuple_key.object` is a type only. ## Examples ### Query for all objects in a type definition To query for all objects that `user:bob` has `reader` relationship in the `document` type definition, call read API with body of ```json { \"tuple_key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:\" } } ``` The API will return tuples and a continuation token, something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `user:bob` has a `reader` relationship with 1 document `document:2021-budget`. Note that this API, unlike the List Objects API, does not evaluate the tuples in the store. The continuation token will be empty if there are no more tuples to query. ### Query for all stored relationship tuples that have a particular relation and object To query for all users that have `reader` relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\", \"relation\": \"reader\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`). Note that, even if the model said that all `writers` are also `readers`, the API will not return writers such as `user:anne` because it only returns tuples and does not evaluate them. ### Query for all users with all relationships for a particular document To query for all users that have any relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:anne\", \"relation\": \"writer\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-05T13:42:12.356Z\" }, { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`) and 1 `writer` (`user:anne`). * @param storeId (required) * @param body (required) * @return CompletableFuture<ReadResponse> @@ -1125,7 +1122,7 @@ public CompletableFuture read(String storeId, ReadRequest body) /** * Get tuples from the store that matches a query, without following userset rewrite rules - * The Read API will return the tuples for a certain store that match a query filter specified in the body of the request. It is different from the `/stores/{store_id}/expand` API in that it only returns relationship tuples that are stored in the system and satisfy the query. In the body: 1. `tuple_key` is optional. If not specified, it will return all tuples in the store. 2. `tuple_key.object` is mandatory if `tuple_key` is specified. It can be a full object (e.g., `type:object_id`) or type only (e.g., `type:`). 3. `tuple_key.user` is mandatory if tuple_key is specified in the case the `tuple_key.object` is a type only. ## Examples ### Query for all objects in a type definition To query for all objects that `user:bob` has `reader` relationship in the `document` type definition, call read API with body of ```json { \"tuple_key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:\" } } ``` The API will return tuples and a continuation token, something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `user:bob` has a `reader` relationship with 1 document `document:2021-budget`. Note that this API, unlike the List Objects API, does not evaluate the tuples in the store. The continuation token will be empty if there are no more tuples to query.### Query for all stored relationship tuples that have a particular relation and object To query for all users that have `reader` relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\", \"relation\": \"reader\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`). Note that, even if the model said that all `writers` are also `readers`, the API will not return writers such as `user:anne` because it only returns tuples and does not evaluate them. ### Query for all users with all relationships for a particular document To query for all users that have any relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:anne\", \"relation\": \"writer\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-05T13:42:12.356Z\" }, { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`) and 1 `writer` (`user:anne`). + * The Read API will return the tuples for a certain store that match a query filter specified in the body of the request. It is different from the `/stores/{store_id}/expand` API in that it only returns relationship tuples that are stored in the system and satisfy the query. In the body: 1. `tuple_key` is optional. If not specified, it will return all tuples in the store. 2. `tuple_key.object` is mandatory if `tuple_key` is specified. It can be a full object (e.g., `type:object_id`) or type only (e.g., `type:`). 3. `tuple_key.user` is mandatory if tuple_key is specified in the case the `tuple_key.object` is a type only. ## Examples ### Query for all objects in a type definition To query for all objects that `user:bob` has `reader` relationship in the `document` type definition, call read API with body of ```json { \"tuple_key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:\" } } ``` The API will return tuples and a continuation token, something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `user:bob` has a `reader` relationship with 1 document `document:2021-budget`. Note that this API, unlike the List Objects API, does not evaluate the tuples in the store. The continuation token will be empty if there are no more tuples to query. ### Query for all stored relationship tuples that have a particular relation and object To query for all users that have `reader` relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\", \"relation\": \"reader\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`). Note that, even if the model said that all `writers` are also `readers`, the API will not return writers such as `user:anne` because it only returns tuples and does not evaluate them. ### Query for all users with all relationships for a particular document To query for all users that have any relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:anne\", \"relation\": \"writer\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-05T13:42:12.356Z\" }, { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`) and 1 `writer` (`user:anne`). * @param storeId (required) * @param body (required) * @param configurationOverride Override the {@link Configuration} this OpenFgaApi was constructed with @@ -1166,7 +1163,7 @@ private CompletableFuture read(String storeId, ReadRequest body, C /** * Get tuples from the store that matches a query, without following userset rewrite rules - * The Read API will return the tuples for a certain store that match a query filter specified in the body of the request. It is different from the `/stores/{store_id}/expand` API in that it only returns relationship tuples that are stored in the system and satisfy the query. In the body: 1. `tuple_key` is optional. If not specified, it will return all tuples in the store. 2. `tuple_key.object` is mandatory if `tuple_key` is specified. It can be a full object (e.g., `type:object_id`) or type only (e.g., `type:`). 3. `tuple_key.user` is mandatory if tuple_key is specified in the case the `tuple_key.object` is a type only. ## Examples ### Query for all objects in a type definition To query for all objects that `user:bob` has `reader` relationship in the `document` type definition, call read API with body of ```json { \"tuple_key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:\" } } ``` The API will return tuples and a continuation token, something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `user:bob` has a `reader` relationship with 1 document `document:2021-budget`. Note that this API, unlike the List Objects API, does not evaluate the tuples in the store. The continuation token will be empty if there are no more tuples to query.### Query for all stored relationship tuples that have a particular relation and object To query for all users that have `reader` relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\", \"relation\": \"reader\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`). Note that, even if the model said that all `writers` are also `readers`, the API will not return writers such as `user:anne` because it only returns tuples and does not evaluate them. ### Query for all users with all relationships for a particular document To query for all users that have any relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:anne\", \"relation\": \"writer\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-05T13:42:12.356Z\" }, { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`) and 1 `writer` (`user:anne`). + * The Read API will return the tuples for a certain store that match a query filter specified in the body of the request. It is different from the `/stores/{store_id}/expand` API in that it only returns relationship tuples that are stored in the system and satisfy the query. In the body: 1. `tuple_key` is optional. If not specified, it will return all tuples in the store. 2. `tuple_key.object` is mandatory if `tuple_key` is specified. It can be a full object (e.g., `type:object_id`) or type only (e.g., `type:`). 3. `tuple_key.user` is mandatory if tuple_key is specified in the case the `tuple_key.object` is a type only. ## Examples ### Query for all objects in a type definition To query for all objects that `user:bob` has `reader` relationship in the `document` type definition, call read API with body of ```json { \"tuple_key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:\" } } ``` The API will return tuples and a continuation token, something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `user:bob` has a `reader` relationship with 1 document `document:2021-budget`. Note that this API, unlike the List Objects API, does not evaluate the tuples in the store. The continuation token will be empty if there are no more tuples to query. ### Query for all stored relationship tuples that have a particular relation and object To query for all users that have `reader` relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\", \"relation\": \"reader\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`). Note that, even if the model said that all `writers` are also `readers`, the API will not return writers such as `user:anne` because it only returns tuples and does not evaluate them. ### Query for all users with all relationships for a particular document To query for all users that have any relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:anne\", \"relation\": \"writer\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-05T13:42:12.356Z\" }, { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`) and 1 `writer` (`user:anne`). * @param storeId (required) * @param body (required) * @return CompletableFuture<ApiResponse<ReadResponse>> @@ -1179,7 +1176,7 @@ public CompletableFuture> readWithHttpInfo(String stor /** * Get tuples from the store that matches a query, without following userset rewrite rules - * The Read API will return the tuples for a certain store that match a query filter specified in the body of the request. It is different from the `/stores/{store_id}/expand` API in that it only returns relationship tuples that are stored in the system and satisfy the query. In the body: 1. `tuple_key` is optional. If not specified, it will return all tuples in the store. 2. `tuple_key.object` is mandatory if `tuple_key` is specified. It can be a full object (e.g., `type:object_id`) or type only (e.g., `type:`). 3. `tuple_key.user` is mandatory if tuple_key is specified in the case the `tuple_key.object` is a type only. ## Examples ### Query for all objects in a type definition To query for all objects that `user:bob` has `reader` relationship in the `document` type definition, call read API with body of ```json { \"tuple_key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:\" } } ``` The API will return tuples and a continuation token, something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `user:bob` has a `reader` relationship with 1 document `document:2021-budget`. Note that this API, unlike the List Objects API, does not evaluate the tuples in the store. The continuation token will be empty if there are no more tuples to query.### Query for all stored relationship tuples that have a particular relation and object To query for all users that have `reader` relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\", \"relation\": \"reader\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`). Note that, even if the model said that all `writers` are also `readers`, the API will not return writers such as `user:anne` because it only returns tuples and does not evaluate them. ### Query for all users with all relationships for a particular document To query for all users that have any relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:anne\", \"relation\": \"writer\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-05T13:42:12.356Z\" }, { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`) and 1 `writer` (`user:anne`). + * The Read API will return the tuples for a certain store that match a query filter specified in the body of the request. It is different from the `/stores/{store_id}/expand` API in that it only returns relationship tuples that are stored in the system and satisfy the query. In the body: 1. `tuple_key` is optional. If not specified, it will return all tuples in the store. 2. `tuple_key.object` is mandatory if `tuple_key` is specified. It can be a full object (e.g., `type:object_id`) or type only (e.g., `type:`). 3. `tuple_key.user` is mandatory if tuple_key is specified in the case the `tuple_key.object` is a type only. ## Examples ### Query for all objects in a type definition To query for all objects that `user:bob` has `reader` relationship in the `document` type definition, call read API with body of ```json { \"tuple_key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:\" } } ``` The API will return tuples and a continuation token, something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `user:bob` has a `reader` relationship with 1 document `document:2021-budget`. Note that this API, unlike the List Objects API, does not evaluate the tuples in the store. The continuation token will be empty if there are no more tuples to query. ### Query for all stored relationship tuples that have a particular relation and object To query for all users that have `reader` relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\", \"relation\": \"reader\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`). Note that, even if the model said that all `writers` are also `readers`, the API will not return writers such as `user:anne` because it only returns tuples and does not evaluate them. ### Query for all users with all relationships for a particular document To query for all users that have any relationship with `document:2021-budget`, call read API with body of ```json { \"tuple_key\": { \"object\": \"document:2021-budget\" } } ``` The API will return something like ```json { \"tuples\": [ { \"key\": { \"user\": \"user:anne\", \"relation\": \"writer\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-05T13:42:12.356Z\" }, { \"key\": { \"user\": \"user:bob\", \"relation\": \"reader\", \"object\": \"document:2021-budget\" }, \"timestamp\": \"2021-10-06T15:32:11.128Z\" } ], \"continuation_token\": \"eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==\" } ``` This means that `document:2021-budget` has 1 `reader` (`user:bob`) and 1 `writer` (`user:anne`). * @param storeId (required) * @param body (required) * @param configurationOverride Override the {@link Configuration} this OpenFgaApi was constructed with diff --git a/src/main/java/dev/openfga/sdk/api/client/ApiClient.java b/src/main/java/dev/openfga/sdk/api/client/ApiClient.java index 9eb82bc..8220120 100644 --- a/src/main/java/dev/openfga/sdk/api/client/ApiClient.java +++ b/src/main/java/dev/openfga/sdk/api/client/ApiClient.java @@ -47,9 +47,6 @@ *

The setter methods of this class return the current object to facilitate * a fluent style of configuration.

*/ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ApiClient { private HttpClient.Builder builder; diff --git a/src/main/java/dev/openfga/sdk/api/client/ApiException.java b/src/main/java/dev/openfga/sdk/api/client/ApiException.java index 603a8b1..7b567e9 100644 --- a/src/main/java/dev/openfga/sdk/api/client/ApiException.java +++ b/src/main/java/dev/openfga/sdk/api/client/ApiException.java @@ -14,9 +14,6 @@ import java.net.http.HttpHeaders; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private HttpHeaders responseHeaders = null; diff --git a/src/main/java/dev/openfga/sdk/api/client/JSON.java b/src/main/java/dev/openfga/sdk/api/client/JSON.java deleted file mode 100644 index c583129..0000000 --- a/src/main/java/dev/openfga/sdk/api/client/JSON.java +++ /dev/null @@ -1,254 +0,0 @@ -package dev.openfga.sdk.api.client; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.json.JsonMapper; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import dev.openfga.sdk.api.model.*; -import java.text.DateFormat; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import org.openapitools.jackson.nullable.JsonNullableModule; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") -public class JSON { - private ObjectMapper mapper; - - public JSON() { - mapper = JsonMapper.builder() - .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) - .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) - .build(); - mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); - mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); - mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); - mapper.setDateFormat(new RFC3339DateFormat()); - mapper.registerModule(new JavaTimeModule()); - JsonNullableModule jnm = new JsonNullableModule(); - mapper.registerModule(jnm); - } - - /** - * Set the date format for JSON (de)serialization with Date properties. - * - * @param dateFormat Date format - */ - public void setDateFormat(DateFormat dateFormat) { - mapper.setDateFormat(dateFormat); - } - - /** - * Get the object mapper - * - * @return object mapper - */ - public ObjectMapper getMapper() { - return mapper; - } - - /** - * Returns the target model class that should be used to deserialize the input data. - * The discriminator mappings are used to determine the target model class. - * - * @param node The input data. - * @param modelClass The class that contains the discriminator mappings. - * - * @return the target model class. - */ - public static Class getClassForElement(JsonNode node, Class modelClass) { - ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); - if (cdm != null) { - return cdm.getClassForElement(node, new HashSet>()); - } - return null; - } - - /** - * Helper class to register the discriminator mappings. - */ - private static class ClassDiscriminatorMapping { - // The model class name. - Class modelClass; - // The name of the discriminator property. - String discriminatorName; - // The discriminator mappings for a model class. - Map> discriminatorMappings; - - // Constructs a new class discriminator. - ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { - modelClass = cls; - discriminatorName = propertyName; - discriminatorMappings = new HashMap>(); - if (mappings != null) { - discriminatorMappings.putAll(mappings); - } - } - - // Return the name of the discriminator property for this model class. - String getDiscriminatorPropertyName() { - return discriminatorName; - } - - // Return the discriminator value or null if the discriminator is not - // present in the payload. - String getDiscriminatorValue(JsonNode node) { - // Determine the value of the discriminator property in the input data. - if (discriminatorName != null) { - // Get the value of the discriminator property, if present in the input payload. - node = node.get(discriminatorName); - if (node != null && node.isValueNode()) { - String discrValue = node.asText(); - if (discrValue != null) { - return discrValue; - } - } - } - return null; - } - - /** - * Returns the target model class that should be used to deserialize the input data. - * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. - * The discriminator mappings are used to determine the target model class. - * - * @param node The input data. - * @param visitedClasses The set of classes that have already been visited. - * - * @return the target model class. - */ - Class getClassForElement(JsonNode node, Set> visitedClasses) { - if (visitedClasses.contains(modelClass)) { - // Class has already been visited. - return null; - } - // Determine the value of the discriminator property in the input data. - String discrValue = getDiscriminatorValue(node); - if (discrValue == null) { - return null; - } - Class cls = discriminatorMappings.get(discrValue); - // It may not be sufficient to return this cls directly because that target class - // may itself be a composed schema, possibly with its own discriminator. - visitedClasses.add(modelClass); - for (Class childClass : discriminatorMappings.values()) { - ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); - if (childCdm == null) { - continue; - } - if (!discriminatorName.equals(childCdm.discriminatorName)) { - discrValue = getDiscriminatorValue(node); - if (discrValue == null) { - continue; - } - } - if (childCdm != null) { - // Recursively traverse the discriminator mappings. - Class childDiscr = childCdm.getClassForElement(node, visitedClasses); - if (childDiscr != null) { - return childDiscr; - } - } - } - return cls; - } - } - - /** - * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. - * - * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, - * so it's not possible to use the instanceof keyword. - * - * @param modelClass A OpenAPI model class. - * @param inst The instance object. - * @param visitedClasses The set of classes that have already been visited. - * - * @return true if inst is an instance of modelClass in the OpenAPI model hierarchy. - */ - public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { - if (modelClass.isInstance(inst)) { - // This handles the 'allOf' use case with single parent inheritance. - return true; - } - if (visitedClasses.contains(modelClass)) { - // This is to prevent infinite recursion when the composed schemas have - // a circular dependency. - return false; - } - visitedClasses.add(modelClass); - - // Traverse the oneOf/anyOf composed schemas. - Map> descendants = modelDescendants.get(modelClass); - if (descendants != null) { - for (Class childType : descendants.values()) { - if (isInstanceOf(childType, inst, visitedClasses)) { - return true; - } - } - } - return false; - } - - /** - * A map of discriminators for all model classes. - */ - private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>(); - - /** - * A map of oneOf/anyOf descendants for each model class. - */ - private static Map, Map>> modelDescendants = new HashMap<>(); - - /** - * Register a model class discriminator. - * - * @param modelClass the model class - * @param discriminatorPropertyName the name of the discriminator property - * @param mappings a map with the discriminator mappings. - */ - public static void registerDiscriminator( - Class modelClass, String discriminatorPropertyName, Map> mappings) { - ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); - modelDiscriminators.put(modelClass, m); - } - - /** - * Register the oneOf/anyOf descendants of the modelClass. - * - * @param modelClass the model class - * @param descendants a map of oneOf/anyOf descendants. - */ - public static void registerDescendants(Class modelClass, Map> descendants) { - modelDescendants.put(modelClass, descendants); - } - - private static JSON json; - - static { - json = new JSON(); - } - - /** - * Get the default JSON instance. - * - * @return the default JSON instance - */ - public static JSON getDefault() { - return json; - } - - /** - * Set the default JSON instance. - * - * @param json JSON instance to be used - */ - public static void setDefault(JSON json) { - JSON.json = json; - } -} diff --git a/src/main/java/dev/openfga/sdk/api/client/Pair.java b/src/main/java/dev/openfga/sdk/api/client/Pair.java index 3082cf1..7068739 100644 --- a/src/main/java/dev/openfga/sdk/api/client/Pair.java +++ b/src/main/java/dev/openfga/sdk/api/client/Pair.java @@ -12,9 +12,6 @@ package dev.openfga.sdk.api.client; -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/dev/openfga/sdk/api/client/BaseConfiguration.java b/src/main/java/dev/openfga/sdk/api/configuration/BaseConfiguration.java similarity index 93% rename from src/main/java/dev/openfga/sdk/api/client/BaseConfiguration.java rename to src/main/java/dev/openfga/sdk/api/configuration/BaseConfiguration.java index 52af3fc..d69162b 100644 --- a/src/main/java/dev/openfga/sdk/api/client/BaseConfiguration.java +++ b/src/main/java/dev/openfga/sdk/api/configuration/BaseConfiguration.java @@ -10,7 +10,7 @@ * Do not edit the class manually. */ -package dev.openfga.sdk.api.client; +package dev.openfga.sdk.api.configuration; import java.time.Duration; diff --git a/src/main/java/dev/openfga/sdk/api/client/Configuration.java b/src/main/java/dev/openfga/sdk/api/configuration/Configuration.java similarity index 99% rename from src/main/java/dev/openfga/sdk/api/client/Configuration.java rename to src/main/java/dev/openfga/sdk/api/configuration/Configuration.java index 99db079..4ba4a38 100644 --- a/src/main/java/dev/openfga/sdk/api/client/Configuration.java +++ b/src/main/java/dev/openfga/sdk/api/configuration/Configuration.java @@ -10,7 +10,7 @@ * Do not edit the class manually. */ -package dev.openfga.sdk.api.client; +package dev.openfga.sdk.api.configuration; import static dev.openfga.util.StringUtil.isNullOrWhitespace; diff --git a/src/main/java/dev/openfga/sdk/api/client/ConfigurationOverride.java b/src/main/java/dev/openfga/sdk/api/configuration/ConfigurationOverride.java similarity index 98% rename from src/main/java/dev/openfga/sdk/api/client/ConfigurationOverride.java rename to src/main/java/dev/openfga/sdk/api/configuration/ConfigurationOverride.java index a0f3802..d317050 100644 --- a/src/main/java/dev/openfga/sdk/api/client/ConfigurationOverride.java +++ b/src/main/java/dev/openfga/sdk/api/configuration/ConfigurationOverride.java @@ -10,7 +10,7 @@ * Do not edit the class manually. */ -package dev.openfga.sdk.api.client; +package dev.openfga.sdk.api.configuration; import java.net.http.HttpClient; import java.net.http.HttpConnectTimeoutException; diff --git a/src/main/java/dev/openfga/sdk/api/model/AbstractOpenApiSchema.java b/src/main/java/dev/openfga/sdk/api/model/AbstractOpenApiSchema.java index 61ad66a..9ade8b9 100644 --- a/src/main/java/dev/openfga/sdk/api/model/AbstractOpenApiSchema.java +++ b/src/main/java/dev/openfga/sdk/api/model/AbstractOpenApiSchema.java @@ -19,9 +19,6 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/dev/openfga/sdk/api/model/Any.java b/src/main/java/dev/openfga/sdk/api/model/Any.java index b9e6649..3c22d9a 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Any.java +++ b/src/main/java/dev/openfga/sdk/api/model/Any.java @@ -28,9 +28,6 @@ * Any */ @JsonPropertyOrder({Any.JSON_PROPERTY_AT_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Any extends HashMap { public static final String JSON_PROPERTY_AT_TYPE = "@type"; private String atType; diff --git a/src/main/java/dev/openfga/sdk/api/model/Assertion.java b/src/main/java/dev/openfga/sdk/api/model/Assertion.java index f0ea766..1c1dbda 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Assertion.java +++ b/src/main/java/dev/openfga/sdk/api/model/Assertion.java @@ -24,9 +24,6 @@ * Assertion */ @JsonPropertyOrder({Assertion.JSON_PROPERTY_TUPLE_KEY, Assertion.JSON_PROPERTY_EXPECTATION}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Assertion { public static final String JSON_PROPERTY_TUPLE_KEY = "tuple_key"; private TupleKey tupleKey; diff --git a/src/main/java/dev/openfga/sdk/api/model/AuthorizationModel.java b/src/main/java/dev/openfga/sdk/api/model/AuthorizationModel.java index e1b1b03..2fb0119 100644 --- a/src/main/java/dev/openfga/sdk/api/model/AuthorizationModel.java +++ b/src/main/java/dev/openfga/sdk/api/model/AuthorizationModel.java @@ -30,9 +30,6 @@ AuthorizationModel.JSON_PROPERTY_SCHEMA_VERSION, AuthorizationModel.JSON_PROPERTY_TYPE_DEFINITIONS }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class AuthorizationModel { public static final String JSON_PROPERTY_ID = "id"; private String id; diff --git a/src/main/java/dev/openfga/sdk/api/model/CheckRequest.java b/src/main/java/dev/openfga/sdk/api/model/CheckRequest.java index 37bf1ee..c5cac07 100644 --- a/src/main/java/dev/openfga/sdk/api/model/CheckRequest.java +++ b/src/main/java/dev/openfga/sdk/api/model/CheckRequest.java @@ -30,9 +30,6 @@ CheckRequest.JSON_PROPERTY_AUTHORIZATION_MODEL_ID, CheckRequest.JSON_PROPERTY_TRACE }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class CheckRequest { public static final String JSON_PROPERTY_TUPLE_KEY = "tuple_key"; private TupleKey tupleKey; diff --git a/src/main/java/dev/openfga/sdk/api/model/CheckResponse.java b/src/main/java/dev/openfga/sdk/api/model/CheckResponse.java index d6a2d67..391943c 100644 --- a/src/main/java/dev/openfga/sdk/api/model/CheckResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/CheckResponse.java @@ -24,9 +24,6 @@ * CheckResponse */ @JsonPropertyOrder({CheckResponse.JSON_PROPERTY_ALLOWED, CheckResponse.JSON_PROPERTY_RESOLUTION}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class CheckResponse { public static final String JSON_PROPERTY_ALLOWED = "allowed"; private Boolean allowed; diff --git a/src/main/java/dev/openfga/sdk/api/model/Computed.java b/src/main/java/dev/openfga/sdk/api/model/Computed.java index 84971b8..7a31ba1 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Computed.java +++ b/src/main/java/dev/openfga/sdk/api/model/Computed.java @@ -24,9 +24,6 @@ * Computed */ @JsonPropertyOrder({Computed.JSON_PROPERTY_USERSET}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Computed { public static final String JSON_PROPERTY_USERSET = "userset"; private String userset; diff --git a/src/main/java/dev/openfga/sdk/api/model/ContextualTupleKeys.java b/src/main/java/dev/openfga/sdk/api/model/ContextualTupleKeys.java index 5c27963..827e148 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ContextualTupleKeys.java +++ b/src/main/java/dev/openfga/sdk/api/model/ContextualTupleKeys.java @@ -24,9 +24,6 @@ * ContextualTupleKeys */ @JsonPropertyOrder({ContextualTupleKeys.JSON_PROPERTY_TUPLE_KEYS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ContextualTupleKeys { public static final String JSON_PROPERTY_TUPLE_KEYS = "tuple_keys"; private List tupleKeys = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/CreateStoreRequest.java b/src/main/java/dev/openfga/sdk/api/model/CreateStoreRequest.java index f7ede74..67cd6d4 100644 --- a/src/main/java/dev/openfga/sdk/api/model/CreateStoreRequest.java +++ b/src/main/java/dev/openfga/sdk/api/model/CreateStoreRequest.java @@ -24,9 +24,6 @@ * CreateStoreRequest */ @JsonPropertyOrder({CreateStoreRequest.JSON_PROPERTY_NAME}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class CreateStoreRequest { public static final String JSON_PROPERTY_NAME = "name"; private String name; diff --git a/src/main/java/dev/openfga/sdk/api/model/CreateStoreResponse.java b/src/main/java/dev/openfga/sdk/api/model/CreateStoreResponse.java index 0e0c853..36185e8 100644 --- a/src/main/java/dev/openfga/sdk/api/model/CreateStoreResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/CreateStoreResponse.java @@ -30,9 +30,6 @@ CreateStoreResponse.JSON_PROPERTY_CREATED_AT, CreateStoreResponse.JSON_PROPERTY_UPDATED_AT }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class CreateStoreResponse { public static final String JSON_PROPERTY_ID = "id"; private String id; diff --git a/src/main/java/dev/openfga/sdk/api/model/Difference.java b/src/main/java/dev/openfga/sdk/api/model/Difference.java index 13e128a..bf3ea0d 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Difference.java +++ b/src/main/java/dev/openfga/sdk/api/model/Difference.java @@ -22,9 +22,6 @@ * Difference */ @JsonPropertyOrder({Difference.JSON_PROPERTY_BASE, Difference.JSON_PROPERTY_SUBTRACT}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Difference { public static final String JSON_PROPERTY_BASE = "base"; private Userset base; diff --git a/src/main/java/dev/openfga/sdk/api/model/ExpandRequest.java b/src/main/java/dev/openfga/sdk/api/model/ExpandRequest.java index 3d95bfd..79a9eca 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ExpandRequest.java +++ b/src/main/java/dev/openfga/sdk/api/model/ExpandRequest.java @@ -24,9 +24,6 @@ * ExpandRequest */ @JsonPropertyOrder({ExpandRequest.JSON_PROPERTY_TUPLE_KEY, ExpandRequest.JSON_PROPERTY_AUTHORIZATION_MODEL_ID}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ExpandRequest { public static final String JSON_PROPERTY_TUPLE_KEY = "tuple_key"; private TupleKey tupleKey; diff --git a/src/main/java/dev/openfga/sdk/api/model/ExpandResponse.java b/src/main/java/dev/openfga/sdk/api/model/ExpandResponse.java index 1fa085d..40f5e64 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ExpandResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/ExpandResponse.java @@ -22,9 +22,6 @@ * ExpandResponse */ @JsonPropertyOrder({ExpandResponse.JSON_PROPERTY_TREE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ExpandResponse { public static final String JSON_PROPERTY_TREE = "tree"; private UsersetTree tree; diff --git a/src/main/java/dev/openfga/sdk/api/model/GetStoreResponse.java b/src/main/java/dev/openfga/sdk/api/model/GetStoreResponse.java index c517e40..2bcd2e6 100644 --- a/src/main/java/dev/openfga/sdk/api/model/GetStoreResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/GetStoreResponse.java @@ -30,9 +30,6 @@ GetStoreResponse.JSON_PROPERTY_CREATED_AT, GetStoreResponse.JSON_PROPERTY_UPDATED_AT }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class GetStoreResponse { public static final String JSON_PROPERTY_ID = "id"; private String id; diff --git a/src/main/java/dev/openfga/sdk/api/model/InternalErrorMessageResponse.java b/src/main/java/dev/openfga/sdk/api/model/InternalErrorMessageResponse.java index 0e5ada3..243584c 100644 --- a/src/main/java/dev/openfga/sdk/api/model/InternalErrorMessageResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/InternalErrorMessageResponse.java @@ -25,9 +25,6 @@ */ @JsonPropertyOrder({InternalErrorMessageResponse.JSON_PROPERTY_CODE, InternalErrorMessageResponse.JSON_PROPERTY_MESSAGE }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class InternalErrorMessageResponse { public static final String JSON_PROPERTY_CODE = "code"; private InternalErrorCode code = InternalErrorCode.NO_INTERNAL_ERROR; diff --git a/src/main/java/dev/openfga/sdk/api/model/Leaf.java b/src/main/java/dev/openfga/sdk/api/model/Leaf.java index 8df60ce..1dda913 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Leaf.java +++ b/src/main/java/dev/openfga/sdk/api/model/Leaf.java @@ -22,9 +22,6 @@ * A leaf node contains either - a set of users (which may be individual users, or usersets referencing other relations) - a computed node, which is the result of a computed userset value in the authorization model - a tupleToUserset nodes, containing the result of expanding a tupleToUserset value in a authorization model. */ @JsonPropertyOrder({Leaf.JSON_PROPERTY_USERS, Leaf.JSON_PROPERTY_COMPUTED, Leaf.JSON_PROPERTY_TUPLE_TO_USERSET}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Leaf { public static final String JSON_PROPERTY_USERS = "users"; private Users users; diff --git a/src/main/java/dev/openfga/sdk/api/model/ListObjectsRequest.java b/src/main/java/dev/openfga/sdk/api/model/ListObjectsRequest.java index 96a77e4..72e85ce 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ListObjectsRequest.java +++ b/src/main/java/dev/openfga/sdk/api/model/ListObjectsRequest.java @@ -30,9 +30,6 @@ ListObjectsRequest.JSON_PROPERTY_USER, ListObjectsRequest.JSON_PROPERTY_CONTEXTUAL_TUPLES }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ListObjectsRequest { public static final String JSON_PROPERTY_AUTHORIZATION_MODEL_ID = "authorization_model_id"; private String authorizationModelId; diff --git a/src/main/java/dev/openfga/sdk/api/model/ListObjectsResponse.java b/src/main/java/dev/openfga/sdk/api/model/ListObjectsResponse.java index 5fe5f5e..27aea7a 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ListObjectsResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/ListObjectsResponse.java @@ -26,9 +26,6 @@ * ListObjectsResponse */ @JsonPropertyOrder({ListObjectsResponse.JSON_PROPERTY_OBJECTS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ListObjectsResponse { public static final String JSON_PROPERTY_OBJECTS = "objects"; private List objects = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/ListStoresResponse.java b/src/main/java/dev/openfga/sdk/api/model/ListStoresResponse.java index 689ea03..350e052 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ListStoresResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/ListStoresResponse.java @@ -26,9 +26,6 @@ * ListStoresResponse */ @JsonPropertyOrder({ListStoresResponse.JSON_PROPERTY_STORES, ListStoresResponse.JSON_PROPERTY_CONTINUATION_TOKEN}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ListStoresResponse { public static final String JSON_PROPERTY_STORES = "stores"; private List stores = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/Metadata.java b/src/main/java/dev/openfga/sdk/api/model/Metadata.java index 236ec4b..76055db 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Metadata.java +++ b/src/main/java/dev/openfga/sdk/api/model/Metadata.java @@ -24,9 +24,6 @@ * Metadata */ @JsonPropertyOrder({Metadata.JSON_PROPERTY_RELATIONS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Metadata { public static final String JSON_PROPERTY_RELATIONS = "relations"; private Map relations = new HashMap<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/Node.java b/src/main/java/dev/openfga/sdk/api/model/Node.java index 916f7f4..84e3333 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Node.java +++ b/src/main/java/dev/openfga/sdk/api/model/Node.java @@ -30,9 +30,6 @@ Node.JSON_PROPERTY_UNION, Node.JSON_PROPERTY_INTERSECTION }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Node { public static final String JSON_PROPERTY_NAME = "name"; private String name; diff --git a/src/main/java/dev/openfga/sdk/api/model/Nodes.java b/src/main/java/dev/openfga/sdk/api/model/Nodes.java index c935a06..a783c09 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Nodes.java +++ b/src/main/java/dev/openfga/sdk/api/model/Nodes.java @@ -24,9 +24,6 @@ * Nodes */ @JsonPropertyOrder({Nodes.JSON_PROPERTY_NODES}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Nodes { public static final String JSON_PROPERTY_NODES = "nodes"; private List nodes = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/ObjectRelation.java b/src/main/java/dev/openfga/sdk/api/model/ObjectRelation.java index 5e706f8..8b4e40f 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ObjectRelation.java +++ b/src/main/java/dev/openfga/sdk/api/model/ObjectRelation.java @@ -24,9 +24,6 @@ * ObjectRelation */ @JsonPropertyOrder({ObjectRelation.JSON_PROPERTY_OBJECT, ObjectRelation.JSON_PROPERTY_RELATION}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ObjectRelation { public static final String JSON_PROPERTY_OBJECT = "object"; private String _object; diff --git a/src/main/java/dev/openfga/sdk/api/model/PathUnknownErrorMessageResponse.java b/src/main/java/dev/openfga/sdk/api/model/PathUnknownErrorMessageResponse.java index efa6849..0e390ed 100644 --- a/src/main/java/dev/openfga/sdk/api/model/PathUnknownErrorMessageResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/PathUnknownErrorMessageResponse.java @@ -27,9 +27,6 @@ PathUnknownErrorMessageResponse.JSON_PROPERTY_CODE, PathUnknownErrorMessageResponse.JSON_PROPERTY_MESSAGE }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class PathUnknownErrorMessageResponse { public static final String JSON_PROPERTY_CODE = "code"; private NotFoundErrorCode code = NotFoundErrorCode.NO_NOT_FOUND_ERROR; diff --git a/src/main/java/dev/openfga/sdk/api/model/ReadAssertionsResponse.java b/src/main/java/dev/openfga/sdk/api/model/ReadAssertionsResponse.java index 9b3585d..4314dd1 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ReadAssertionsResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/ReadAssertionsResponse.java @@ -29,9 +29,6 @@ ReadAssertionsResponse.JSON_PROPERTY_AUTHORIZATION_MODEL_ID, ReadAssertionsResponse.JSON_PROPERTY_ASSERTIONS }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ReadAssertionsResponse { public static final String JSON_PROPERTY_AUTHORIZATION_MODEL_ID = "authorization_model_id"; private String authorizationModelId; diff --git a/src/main/java/dev/openfga/sdk/api/model/ReadAuthorizationModelResponse.java b/src/main/java/dev/openfga/sdk/api/model/ReadAuthorizationModelResponse.java index aa7c7f1..a95f2fa 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ReadAuthorizationModelResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/ReadAuthorizationModelResponse.java @@ -22,9 +22,6 @@ * ReadAuthorizationModelResponse */ @JsonPropertyOrder({ReadAuthorizationModelResponse.JSON_PROPERTY_AUTHORIZATION_MODEL}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ReadAuthorizationModelResponse { public static final String JSON_PROPERTY_AUTHORIZATION_MODEL = "authorization_model"; private AuthorizationModel authorizationModel; diff --git a/src/main/java/dev/openfga/sdk/api/model/ReadAuthorizationModelsResponse.java b/src/main/java/dev/openfga/sdk/api/model/ReadAuthorizationModelsResponse.java index 85fb4ae..99ceaed 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ReadAuthorizationModelsResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/ReadAuthorizationModelsResponse.java @@ -29,9 +29,6 @@ ReadAuthorizationModelsResponse.JSON_PROPERTY_AUTHORIZATION_MODELS, ReadAuthorizationModelsResponse.JSON_PROPERTY_CONTINUATION_TOKEN }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ReadAuthorizationModelsResponse { public static final String JSON_PROPERTY_AUTHORIZATION_MODELS = "authorization_models"; private List authorizationModels = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/ReadChangesResponse.java b/src/main/java/dev/openfga/sdk/api/model/ReadChangesResponse.java index df85423..e376e84 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ReadChangesResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/ReadChangesResponse.java @@ -26,9 +26,6 @@ * ReadChangesResponse */ @JsonPropertyOrder({ReadChangesResponse.JSON_PROPERTY_CHANGES, ReadChangesResponse.JSON_PROPERTY_CONTINUATION_TOKEN}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ReadChangesResponse { public static final String JSON_PROPERTY_CHANGES = "changes"; private List changes = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/ReadRequest.java b/src/main/java/dev/openfga/sdk/api/model/ReadRequest.java index 640bb2f..07829dc 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ReadRequest.java +++ b/src/main/java/dev/openfga/sdk/api/model/ReadRequest.java @@ -28,9 +28,6 @@ ReadRequest.JSON_PROPERTY_PAGE_SIZE, ReadRequest.JSON_PROPERTY_CONTINUATION_TOKEN }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ReadRequest { public static final String JSON_PROPERTY_TUPLE_KEY = "tuple_key"; private TupleKey tupleKey; diff --git a/src/main/java/dev/openfga/sdk/api/model/ReadResponse.java b/src/main/java/dev/openfga/sdk/api/model/ReadResponse.java index 27a7772..a3436a2 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ReadResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/ReadResponse.java @@ -26,9 +26,6 @@ * ReadResponse */ @JsonPropertyOrder({ReadResponse.JSON_PROPERTY_TUPLES, ReadResponse.JSON_PROPERTY_CONTINUATION_TOKEN}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ReadResponse { public static final String JSON_PROPERTY_TUPLES = "tuples"; private List tuples = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/RelationMetadata.java b/src/main/java/dev/openfga/sdk/api/model/RelationMetadata.java index 281fd27..6f2e396 100644 --- a/src/main/java/dev/openfga/sdk/api/model/RelationMetadata.java +++ b/src/main/java/dev/openfga/sdk/api/model/RelationMetadata.java @@ -24,9 +24,6 @@ * RelationMetadata */ @JsonPropertyOrder({RelationMetadata.JSON_PROPERTY_DIRECTLY_RELATED_USER_TYPES}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class RelationMetadata { public static final String JSON_PROPERTY_DIRECTLY_RELATED_USER_TYPES = "directly_related_user_types"; private List directlyRelatedUserTypes = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/RelationReference.java b/src/main/java/dev/openfga/sdk/api/model/RelationReference.java index 1bee35c..7dadb43 100644 --- a/src/main/java/dev/openfga/sdk/api/model/RelationReference.java +++ b/src/main/java/dev/openfga/sdk/api/model/RelationReference.java @@ -28,9 +28,6 @@ RelationReference.JSON_PROPERTY_RELATION, RelationReference.JSON_PROPERTY_WILDCARD }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class RelationReference { public static final String JSON_PROPERTY_TYPE = "type"; private String type; diff --git a/src/main/java/dev/openfga/sdk/api/model/Status.java b/src/main/java/dev/openfga/sdk/api/model/Status.java index 9c3a542..6da6bc3 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Status.java +++ b/src/main/java/dev/openfga/sdk/api/model/Status.java @@ -26,9 +26,6 @@ * Status */ @JsonPropertyOrder({Status.JSON_PROPERTY_CODE, Status.JSON_PROPERTY_MESSAGE, Status.JSON_PROPERTY_DETAILS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Status { public static final String JSON_PROPERTY_CODE = "code"; private Integer code; diff --git a/src/main/java/dev/openfga/sdk/api/model/Store.java b/src/main/java/dev/openfga/sdk/api/model/Store.java index 2e89317..30910d7 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Store.java +++ b/src/main/java/dev/openfga/sdk/api/model/Store.java @@ -31,9 +31,6 @@ Store.JSON_PROPERTY_UPDATED_AT, Store.JSON_PROPERTY_DELETED_AT }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Store { public static final String JSON_PROPERTY_ID = "id"; private String id; diff --git a/src/main/java/dev/openfga/sdk/api/model/Tuple.java b/src/main/java/dev/openfga/sdk/api/model/Tuple.java index 25cd1ca..65f104e 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Tuple.java +++ b/src/main/java/dev/openfga/sdk/api/model/Tuple.java @@ -25,9 +25,6 @@ * Tuple */ @JsonPropertyOrder({Tuple.JSON_PROPERTY_KEY, Tuple.JSON_PROPERTY_TIMESTAMP}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Tuple { public static final String JSON_PROPERTY_KEY = "key"; private TupleKey key; diff --git a/src/main/java/dev/openfga/sdk/api/model/TupleChange.java b/src/main/java/dev/openfga/sdk/api/model/TupleChange.java index 341ae59..d8d9949 100644 --- a/src/main/java/dev/openfga/sdk/api/model/TupleChange.java +++ b/src/main/java/dev/openfga/sdk/api/model/TupleChange.java @@ -29,9 +29,6 @@ TupleChange.JSON_PROPERTY_OPERATION, TupleChange.JSON_PROPERTY_TIMESTAMP }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class TupleChange { public static final String JSON_PROPERTY_TUPLE_KEY = "tuple_key"; private TupleKey tupleKey; diff --git a/src/main/java/dev/openfga/sdk/api/model/TupleKey.java b/src/main/java/dev/openfga/sdk/api/model/TupleKey.java index f010e29..a6e9cc6 100644 --- a/src/main/java/dev/openfga/sdk/api/model/TupleKey.java +++ b/src/main/java/dev/openfga/sdk/api/model/TupleKey.java @@ -24,9 +24,6 @@ * TupleKey */ @JsonPropertyOrder({TupleKey.JSON_PROPERTY_OBJECT, TupleKey.JSON_PROPERTY_RELATION, TupleKey.JSON_PROPERTY_USER}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class TupleKey { public static final String JSON_PROPERTY_OBJECT = "object"; private String _object; diff --git a/src/main/java/dev/openfga/sdk/api/model/TupleKeys.java b/src/main/java/dev/openfga/sdk/api/model/TupleKeys.java index 0c8c6b6..764cbe6 100644 --- a/src/main/java/dev/openfga/sdk/api/model/TupleKeys.java +++ b/src/main/java/dev/openfga/sdk/api/model/TupleKeys.java @@ -24,9 +24,6 @@ * TupleKeys */ @JsonPropertyOrder({TupleKeys.JSON_PROPERTY_TUPLE_KEYS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class TupleKeys { public static final String JSON_PROPERTY_TUPLE_KEYS = "tuple_keys"; private List tupleKeys = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/TupleToUserset.java b/src/main/java/dev/openfga/sdk/api/model/TupleToUserset.java index c19475c..851db6c 100644 --- a/src/main/java/dev/openfga/sdk/api/model/TupleToUserset.java +++ b/src/main/java/dev/openfga/sdk/api/model/TupleToUserset.java @@ -22,9 +22,6 @@ * TupleToUserset */ @JsonPropertyOrder({TupleToUserset.JSON_PROPERTY_TUPLESET, TupleToUserset.JSON_PROPERTY_COMPUTED_USERSET}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class TupleToUserset { public static final String JSON_PROPERTY_TUPLESET = "tupleset"; private ObjectRelation tupleset; diff --git a/src/main/java/dev/openfga/sdk/api/model/TypeDefinition.java b/src/main/java/dev/openfga/sdk/api/model/TypeDefinition.java index ef15346..de347a3 100644 --- a/src/main/java/dev/openfga/sdk/api/model/TypeDefinition.java +++ b/src/main/java/dev/openfga/sdk/api/model/TypeDefinition.java @@ -30,9 +30,6 @@ TypeDefinition.JSON_PROPERTY_RELATIONS, TypeDefinition.JSON_PROPERTY_METADATA }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class TypeDefinition { public static final String JSON_PROPERTY_TYPE = "type"; private String type; diff --git a/src/main/java/dev/openfga/sdk/api/model/Users.java b/src/main/java/dev/openfga/sdk/api/model/Users.java index bb5a919..e5b9119 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Users.java +++ b/src/main/java/dev/openfga/sdk/api/model/Users.java @@ -26,9 +26,6 @@ * Users */ @JsonPropertyOrder({Users.JSON_PROPERTY_USERS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Users { public static final String JSON_PROPERTY_USERS = "users"; private List users = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/Userset.java b/src/main/java/dev/openfga/sdk/api/model/Userset.java index 466a611..44ca15a 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Userset.java +++ b/src/main/java/dev/openfga/sdk/api/model/Userset.java @@ -31,9 +31,6 @@ Userset.JSON_PROPERTY_INTERSECTION, Userset.JSON_PROPERTY_DIFFERENCE }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Userset { public static final String JSON_PROPERTY_THIS = "this"; private Object _this; diff --git a/src/main/java/dev/openfga/sdk/api/model/UsersetTree.java b/src/main/java/dev/openfga/sdk/api/model/UsersetTree.java index 91f9de8..b56e458 100644 --- a/src/main/java/dev/openfga/sdk/api/model/UsersetTree.java +++ b/src/main/java/dev/openfga/sdk/api/model/UsersetTree.java @@ -22,9 +22,6 @@ * A UsersetTree contains the result of an Expansion. */ @JsonPropertyOrder({UsersetTree.JSON_PROPERTY_ROOT}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class UsersetTree { public static final String JSON_PROPERTY_ROOT = "root"; private Node root; diff --git a/src/main/java/dev/openfga/sdk/api/model/UsersetTreeDifference.java b/src/main/java/dev/openfga/sdk/api/model/UsersetTreeDifference.java index a5a98ad..d0990c2 100644 --- a/src/main/java/dev/openfga/sdk/api/model/UsersetTreeDifference.java +++ b/src/main/java/dev/openfga/sdk/api/model/UsersetTreeDifference.java @@ -22,9 +22,6 @@ * UsersetTreeDifference */ @JsonPropertyOrder({UsersetTreeDifference.JSON_PROPERTY_BASE, UsersetTreeDifference.JSON_PROPERTY_SUBTRACT}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class UsersetTreeDifference { public static final String JSON_PROPERTY_BASE = "base"; private Node base; diff --git a/src/main/java/dev/openfga/sdk/api/model/UsersetTreeTupleToUserset.java b/src/main/java/dev/openfga/sdk/api/model/UsersetTreeTupleToUserset.java index 47169c2..fa50eca 100644 --- a/src/main/java/dev/openfga/sdk/api/model/UsersetTreeTupleToUserset.java +++ b/src/main/java/dev/openfga/sdk/api/model/UsersetTreeTupleToUserset.java @@ -26,9 +26,6 @@ * UsersetTreeTupleToUserset */ @JsonPropertyOrder({UsersetTreeTupleToUserset.JSON_PROPERTY_TUPLESET, UsersetTreeTupleToUserset.JSON_PROPERTY_COMPUTED}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class UsersetTreeTupleToUserset { public static final String JSON_PROPERTY_TUPLESET = "tupleset"; private String tupleset; diff --git a/src/main/java/dev/openfga/sdk/api/model/Usersets.java b/src/main/java/dev/openfga/sdk/api/model/Usersets.java index f4bcfc8..bcbdcab 100644 --- a/src/main/java/dev/openfga/sdk/api/model/Usersets.java +++ b/src/main/java/dev/openfga/sdk/api/model/Usersets.java @@ -24,9 +24,6 @@ * Usersets */ @JsonPropertyOrder({Usersets.JSON_PROPERTY_CHILD}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class Usersets { public static final String JSON_PROPERTY_CHILD = "child"; private List child = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/ValidationErrorMessageResponse.java b/src/main/java/dev/openfga/sdk/api/model/ValidationErrorMessageResponse.java index a9b31c3..c598f06 100644 --- a/src/main/java/dev/openfga/sdk/api/model/ValidationErrorMessageResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/ValidationErrorMessageResponse.java @@ -27,9 +27,6 @@ ValidationErrorMessageResponse.JSON_PROPERTY_CODE, ValidationErrorMessageResponse.JSON_PROPERTY_MESSAGE }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class ValidationErrorMessageResponse { public static final String JSON_PROPERTY_CODE = "code"; private ErrorCode code = ErrorCode.NO_ERROR; diff --git a/src/main/java/dev/openfga/sdk/api/model/WriteAssertionsRequest.java b/src/main/java/dev/openfga/sdk/api/model/WriteAssertionsRequest.java index b84c27e..5d92330 100644 --- a/src/main/java/dev/openfga/sdk/api/model/WriteAssertionsRequest.java +++ b/src/main/java/dev/openfga/sdk/api/model/WriteAssertionsRequest.java @@ -24,9 +24,6 @@ * WriteAssertionsRequest */ @JsonPropertyOrder({WriteAssertionsRequest.JSON_PROPERTY_ASSERTIONS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class WriteAssertionsRequest { public static final String JSON_PROPERTY_ASSERTIONS = "assertions"; private List assertions = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/WriteAuthorizationModelRequest.java b/src/main/java/dev/openfga/sdk/api/model/WriteAuthorizationModelRequest.java index 8f70b12..40147eb 100644 --- a/src/main/java/dev/openfga/sdk/api/model/WriteAuthorizationModelRequest.java +++ b/src/main/java/dev/openfga/sdk/api/model/WriteAuthorizationModelRequest.java @@ -29,9 +29,6 @@ WriteAuthorizationModelRequest.JSON_PROPERTY_TYPE_DEFINITIONS, WriteAuthorizationModelRequest.JSON_PROPERTY_SCHEMA_VERSION }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class WriteAuthorizationModelRequest { public static final String JSON_PROPERTY_TYPE_DEFINITIONS = "type_definitions"; private List typeDefinitions = new ArrayList<>(); diff --git a/src/main/java/dev/openfga/sdk/api/model/WriteAuthorizationModelResponse.java b/src/main/java/dev/openfga/sdk/api/model/WriteAuthorizationModelResponse.java index b51009e..42115c8 100644 --- a/src/main/java/dev/openfga/sdk/api/model/WriteAuthorizationModelResponse.java +++ b/src/main/java/dev/openfga/sdk/api/model/WriteAuthorizationModelResponse.java @@ -24,9 +24,6 @@ * WriteAuthorizationModelResponse */ @JsonPropertyOrder({WriteAuthorizationModelResponse.JSON_PROPERTY_AUTHORIZATION_MODEL_ID}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class WriteAuthorizationModelResponse { public static final String JSON_PROPERTY_AUTHORIZATION_MODEL_ID = "authorization_model_id"; private String authorizationModelId; diff --git a/src/main/java/dev/openfga/sdk/api/model/WriteRequest.java b/src/main/java/dev/openfga/sdk/api/model/WriteRequest.java index 00943e9..6efa272 100644 --- a/src/main/java/dev/openfga/sdk/api/model/WriteRequest.java +++ b/src/main/java/dev/openfga/sdk/api/model/WriteRequest.java @@ -28,9 +28,6 @@ WriteRequest.JSON_PROPERTY_DELETES, WriteRequest.JSON_PROPERTY_AUTHORIZATION_MODEL_ID }) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - date = "2023-08-28T14:41:07.855252Z[Etc/UTC]") public class WriteRequest { public static final String JSON_PROPERTY_WRITES = "writes"; private TupleKeys writes; diff --git a/src/test-integration/java/dev/openfga/sdk/api/OpenFgaApiIntegrationTest.java b/src/test-integration/java/dev/openfga/sdk/api/OpenFgaApiIntegrationTest.java index 82f22d0..f2ddc76 100644 --- a/src/test-integration/java/dev/openfga/sdk/api/OpenFgaApiIntegrationTest.java +++ b/src/test-integration/java/dev/openfga/sdk/api/OpenFgaApiIntegrationTest.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import dev.openfga.sdk.api.client.*; +import dev.openfga.sdk.api.configuration.*; import dev.openfga.sdk.api.model.*; import java.net.http.HttpClient; import java.util.List; diff --git a/src/test/java/dev/openfga/sdk/api/OpenFgaApiTest.java b/src/test/java/dev/openfga/sdk/api/OpenFgaApiTest.java index 64826fe..0f0c243 100644 --- a/src/test/java/dev/openfga/sdk/api/OpenFgaApiTest.java +++ b/src/test/java/dev/openfga/sdk/api/OpenFgaApiTest.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.pgssoft.httpclient.HttpClientMock; import dev.openfga.sdk.api.client.*; +import dev.openfga.sdk.api.configuration.*; import dev.openfga.sdk.api.model.*; import dev.openfga.sdk.errors.*; import java.time.Duration; diff --git a/src/test/java/dev/openfga/sdk/api/client/ConfigurationTest.java b/src/test/java/dev/openfga/sdk/api/configuration/ConfigurationTest.java similarity index 93% rename from src/test/java/dev/openfga/sdk/api/client/ConfigurationTest.java rename to src/test/java/dev/openfga/sdk/api/configuration/ConfigurationTest.java index 15e1e50..c9d0b4b 100644 --- a/src/test/java/dev/openfga/sdk/api/client/ConfigurationTest.java +++ b/src/test/java/dev/openfga/sdk/api/configuration/ConfigurationTest.java @@ -1,4 +1,16 @@ -package dev.openfga.sdk.api.client; +/* + * OpenFGA + * A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar. + * + * The version of the OpenAPI document: 0.1 + * Contact: community@openfga.dev + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package dev.openfga.sdk.api.configuration; import static org.junit.jupiter.api.Assertions.*;