From d7ec780741070526a41ebba590358ff60f9dc179 Mon Sep 17 00:00:00 2001 From: Ewan Harris Date: Mon, 22 Jan 2024 17:51:04 +0000 Subject: [PATCH 1/2] fix: fix incorrect check for whether transactionChunkSize is not set --- .../dev/openfga/sdk/api/configuration/ClientWriteOptions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dev/openfga/sdk/api/configuration/ClientWriteOptions.java b/src/main/java/dev/openfga/sdk/api/configuration/ClientWriteOptions.java index c18634b8..0400e35e 100644 --- a/src/main/java/dev/openfga/sdk/api/configuration/ClientWriteOptions.java +++ b/src/main/java/dev/openfga/sdk/api/configuration/ClientWriteOptions.java @@ -54,6 +54,6 @@ public ClientWriteOptions transactionChunkSize(int transactionChunkSize) { } public int getTransactionChunkSize() { - return transactionChunkSize >= 0 ? transactionChunkSize : 1; + return transactionChunkSize > 0 ? transactionChunkSize : 1; } } From 5cfd12431b7a3afd73f6154ab08a078d01ca93b1 Mon Sep 17 00:00:00 2001 From: Ewan Harris Date: Mon, 22 Jan 2024 17:52:01 +0000 Subject: [PATCH 2/2] chore: bump version to 0.3.1 --- CHANGELOG.md | 12 ++++++++++-- README.md | 12 ++++++------ build.gradle | 2 +- publish.gradle | 2 +- .../openfga/sdk/api/configuration/Configuration.java | 4 ++-- .../sdk/api/configuration/ConfigurationTest.java | 2 +- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8e32afb..61c54fbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,23 @@ # Changelog +## v0.3.1 + +### [0.3.1](https://github.com/openfga/java-sdk/compare/v0.3.0...v0.3.1) (2024-01-22) + +- feat: oauth2 client credentials support - thanks @le-yams +- fix: add context to ClientCheckRequest +- fix incorrect check for whether transactionChunkSize is not set + ## v0.3.0 ### [0.3.0](https://github.com/openfga/java-sdk/compare/v0.2.3...v0.3.0) (2023-12-13) -- feat: support for Conditions +- feat: support for [conditions](https://openfga.dev/blog/conditional-tuples-announcement) - feat: standard OpenFGA headers have been added to Write, BatchCheck, and ListRelations calls - feat: apiTokenIssuer has been expanded to support arbitrary http and https URLs. previously it supported only configuring a hostname - thanks @le-yams - feat: allow setting and overriding http headers -- [BREAKING] chore: use latest API interfaces +- [BREAKING] chore!: use latest API interfaces - chore: dependency updates - refactor: abstract common functionality; update validation and exception types diff --git a/README.md b/README.md index c772d07d..54af6db7 100644 --- a/README.md +++ b/README.md @@ -74,13 +74,13 @@ It can be used with the following: * Gradle (Groovy) ```groovy -implementation 'dev.openfga:openfga-sdk:0.3.0' +implementation 'dev.openfga:openfga-sdk:0.3.1' ``` * Gradle (Kotlin) ```kotlin -implementation("dev.openfga:openfga-sdk:0.3.0") +implementation("dev.openfga:openfga-sdk:0.3.1") ``` * Apache Maven @@ -89,26 +89,26 @@ implementation("dev.openfga:openfga-sdk:0.3.0") dev.openfga openfga-sdk - 0.3.0 + 0.3.1 ``` * Ivy ```xml - + ``` * SBT ```scala -libraryDependencies += "dev.openfga" % "openfga-sdk" % "0.3.0" +libraryDependencies += "dev.openfga" % "openfga-sdk" % "0.3.1" ``` * Leiningen ```edn -[dev.openfga/openfga-sdk "0.3.0"] +[dev.openfga/openfga-sdk "0.3.1"] ``` diff --git a/build.gradle b/build.gradle index 0e7cac43..9b1f4a60 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ plugins { apply from: 'publish.gradle' group = 'dev.openfga' -version = '0.3.0' +version = '0.3.1' repositories { mavenCentral() diff --git a/publish.gradle b/publish.gradle index 0ef8074f..14b32285 100644 --- a/publish.gradle +++ b/publish.gradle @@ -6,7 +6,7 @@ publishing { pom { group = 'dev.openfga' name = 'openfga-sdk' - version = '0.3.0' + version = '0.3.1' description = 'This is an autogenerated Java SDK for OpenFGA. It provides a wrapper around the [OpenFGA API definition](https://openfga.dev/api).' url = 'https://openfga.dev' licenses { diff --git a/src/main/java/dev/openfga/sdk/api/configuration/Configuration.java b/src/main/java/dev/openfga/sdk/api/configuration/Configuration.java index 9d2155ef..cba92b8e 100644 --- a/src/main/java/dev/openfga/sdk/api/configuration/Configuration.java +++ b/src/main/java/dev/openfga/sdk/api/configuration/Configuration.java @@ -30,10 +30,10 @@ * Configurations for an api client. */ public class Configuration implements BaseConfiguration { - public static final String VERSION = "0.3.0"; + public static final String VERSION = "0.3.1"; private static final String DEFAULT_API_URL = "http://localhost:8080"; - private static final String DEFAULT_USER_AGENT = "openfga-sdk java/0.3.0"; + private static final String DEFAULT_USER_AGENT = "openfga-sdk java/0.3.1"; private static final Duration DEFAULT_READ_TIMEOUT = Duration.ofSeconds(10); private static final Duration DEFAULT_CONNECT_TIMEOUT = Duration.ofSeconds(10); diff --git a/src/test/java/dev/openfga/sdk/api/configuration/ConfigurationTest.java b/src/test/java/dev/openfga/sdk/api/configuration/ConfigurationTest.java index c29ef65f..142f981f 100644 --- a/src/test/java/dev/openfga/sdk/api/configuration/ConfigurationTest.java +++ b/src/test/java/dev/openfga/sdk/api/configuration/ConfigurationTest.java @@ -22,7 +22,7 @@ class ConfigurationTest { private static final String DEFAULT_API_URL = "http://localhost:8080"; - private static final String DEFAULT_USER_AGENT = "openfga-sdk java/0.3.0"; + private static final String DEFAULT_USER_AGENT = "openfga-sdk java/0.3.1"; private static final Duration DEFAULT_READ_TIMEOUT = Duration.ofSeconds(10); private static final Duration DEFAULT_CONNECT_TIMEOUT = Duration.ofSeconds(10); private static final Map DEFAULT_HEADERS = Map.of();