Skip to content

Commit

Permalink
feat(client): add headers for Write/BatchCheck/ListRelations, add hea…
Browse files Browse the repository at this point in the history
…der overriding to client
  • Loading branch information
booniepepper committed Dec 12, 2023
1 parent 4d42405 commit fb2f4c6
Show file tree
Hide file tree
Showing 35 changed files with 1,155 additions and 59 deletions.
12 changes: 12 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ README.md
VERSION.txt
api/openapi.yaml
build.gradle
docs/AbortedMessageResponse.md
docs/Any.md
docs/Assertion.md
docs/AssertionTupleKey.md
Expand Down Expand Up @@ -111,6 +112,7 @@ src/main/java/dev/openfga/sdk/api/client/ClientListStoresResponse.java
src/main/java/dev/openfga/sdk/api/client/ClientReadAssertionsResponse.java
src/main/java/dev/openfga/sdk/api/client/ClientReadAuthorizationModelResponse.java
src/main/java/dev/openfga/sdk/api/client/ClientReadAuthorizationModelsResponse.java
src/main/java/dev/openfga/sdk/api/client/ClientReadChangesRequest.java
src/main/java/dev/openfga/sdk/api/client/ClientReadChangesResponse.java
src/main/java/dev/openfga/sdk/api/client/ClientReadRequest.java
src/main/java/dev/openfga/sdk/api/client/ClientReadResponse.java
Expand All @@ -123,27 +125,36 @@ src/main/java/dev/openfga/sdk/api/client/ClientWriteRequest.java
src/main/java/dev/openfga/sdk/api/client/ClientWriteResponse.java
src/main/java/dev/openfga/sdk/api/client/HttpRequestAttempt.java
src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.java
src/main/java/dev/openfga/sdk/api/configuration/AdditionalHeadersSupplier.java
src/main/java/dev/openfga/sdk/api/configuration/ApiToken.java
src/main/java/dev/openfga/sdk/api/configuration/BaseConfiguration.java
src/main/java/dev/openfga/sdk/api/configuration/ClientBatchCheckOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientCheckOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientConfiguration.java
src/main/java/dev/openfga/sdk/api/configuration/ClientCreateStoreOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientCredentials.java
src/main/java/dev/openfga/sdk/api/configuration/ClientDeleteStoreOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientDeleteTuplesOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientExpandOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientGetStoreOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientListObjectsOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientListRelationsOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientListStoresOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientReadAssertionsOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientReadAuthorizationModelOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientReadAuthorizationModelsOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientReadChangesOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientReadLatestAuthorizationModelOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientReadOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientWriteAssertionsOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientWriteAuthorizationModelOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientWriteOptions.java
src/main/java/dev/openfga/sdk/api/configuration/ClientWriteTuplesOptions.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/configuration/Credentials.java
src/main/java/dev/openfga/sdk/api/configuration/CredentialsMethod.java
src/main/java/dev/openfga/sdk/api/model/AbortedMessageResponse.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
Expand Down Expand Up @@ -231,6 +242,7 @@ src/test/java/dev/openfga/sdk/api/auth/OAuth2ClientTest.java
src/test/java/dev/openfga/sdk/api/client/OpenFgaClientTest.java
src/test/java/dev/openfga/sdk/api/configuration/ClientCredentialsTest.java
src/test/java/dev/openfga/sdk/api/configuration/ConfigurationTest.java
src/test/java/dev/openfga/sdk/api/model/AbortedMessageResponseTest.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/AssertionTupleKeyTest.java
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,8 @@ fgaClient.writeAssertions(assertions, options).get();
### Models


- [AbortedMessageResponse](https://github.com/openfga/java-sdk/blob/main/docs/AbortedMessageResponse.md)

- [Any](https://github.com/openfga/java-sdk/blob/main/docs/Any.md)

- [Assertion](https://github.com/openfga/java-sdk/blob/main/docs/Assertion.md)
Expand Down
14 changes: 14 additions & 0 deletions docs/AbortedMessageResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@


# AbortedMessageResponse


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**code** | **String** | | [optional] |
|**message** | **String** | | [optional] |



30 changes: 30 additions & 0 deletions docs/OpenFgaApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## checkWithHttpInfo
Expand Down Expand Up @@ -187,6 +188,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -257,6 +259,7 @@ No authorization required
| **201** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## createStoreWithHttpInfo
Expand Down Expand Up @@ -336,6 +339,7 @@ No authorization required
| **201** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -405,6 +409,7 @@ No authorization required
| **204** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## deleteStoreWithHttpInfo
Expand Down Expand Up @@ -483,6 +488,7 @@ No authorization required
| **204** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -555,6 +561,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## expandWithHttpInfo
Expand Down Expand Up @@ -636,6 +643,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -706,6 +714,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## getStoreWithHttpInfo
Expand Down Expand Up @@ -785,6 +794,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -857,6 +867,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## listObjectsWithHttpInfo
Expand Down Expand Up @@ -938,6 +949,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -1010,6 +1022,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## listStoresWithHttpInfo
Expand Down Expand Up @@ -1091,6 +1104,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -1163,6 +1177,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## readWithHttpInfo
Expand Down Expand Up @@ -1244,6 +1259,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -1316,6 +1332,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## readAssertionsWithHttpInfo
Expand Down Expand Up @@ -1397,6 +1414,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -1469,6 +1487,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## readAuthorizationModelWithHttpInfo
Expand Down Expand Up @@ -1550,6 +1569,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -1624,6 +1644,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## readAuthorizationModelsWithHttpInfo
Expand Down Expand Up @@ -1707,6 +1728,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -1783,6 +1805,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## readChangesWithHttpInfo
Expand Down Expand Up @@ -1868,6 +1891,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -1940,6 +1964,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## writeWithHttpInfo
Expand Down Expand Up @@ -2021,6 +2046,7 @@ No authorization required
| **200** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -2094,6 +2120,7 @@ No authorization required
| **204** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## writeAssertionsWithHttpInfo
Expand Down Expand Up @@ -2176,6 +2203,7 @@ No authorization required
| **204** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |


Expand Down Expand Up @@ -2248,6 +2276,7 @@ No authorization required
| **201** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

## writeAuthorizationModelWithHttpInfo
Expand Down Expand Up @@ -2329,5 +2358,6 @@ No authorization required
| **201** | A successful response. | - |
| **400** | Request failed due to invalid input. | - |
| **404** | Request failed due to incorrect path. | - |
| **409** | Request was aborted due a transaction conflict. | - |
| **500** | Request failed due to internal server error. | - |

Loading

0 comments on commit fb2f4c6

Please sign in to comment.