Context
PR #352 added an affirmative transaction API to ClientWriteOptions: transactions(boolean) and isTransactionsEnabled(). These replace the double-negative disableTransactions(boolean) / disableTransactions() pair. Both APIs currently coexist and neither old method is deprecated yet.
Before the old methods can be deprecated, the public guidance that still teaches them has to move to the new API. If deprecation lands first, released docs and examples will steer users onto methods that emit warnings. This was raised in review on PR #352.
This issue covers the hand-written docs and examples in the java-sdk repo. The generated README.md is tracked separately in openfga/sdk-generator (its template is the source of truth).
Scope
Migrate disableTransactions(true) to transactions(false) and disableTransactions(false) to transactions(true), and mode-checks from options.disableTransactions() to !options.isTransactionsEnabled().
Javadoc:
src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.java mode-selection prose around lines 415, 424, 469, 478
Example projects:
examples/basic-examples/src/main/java/dev/openfga/sdk/example/Example1.java:120
examples/basic-examples/src/main/kotlin/dev/openfga/sdk/example/KotlinExample1.kt:120
src/test-integration/java/dev/openfga/sdk/example/Example1.java:120
Out of scope
README.md write examples (lines 617, 628, 653): generated, fixed via openfga/sdk-generator.
- Test call-sites in
OpenFgaClientTest, OpenFgaClientHeadersTest, OpenFgaClientWriteResponseHeadersTest: migrated as part of the deprecation issue, so at least one back-compat test intentionally keeps disableTransactions.
- Adding the
@Deprecated annotation: separate issue, gated on this one shipping in a release.
Acceptance criteria
Sequencing
First step in the deprecation lifecycle. Blocks the deprecation issue: that issue stays blocked until this change is in a published release, not just merged. Tracked in the umbrella issue.
Owner: @curfew-marathon
Context
PR #352 added an affirmative transaction API to
ClientWriteOptions:transactions(boolean)andisTransactionsEnabled(). These replace the double-negativedisableTransactions(boolean)/disableTransactions()pair. Both APIs currently coexist and neither old method is deprecated yet.Before the old methods can be deprecated, the public guidance that still teaches them has to move to the new API. If deprecation lands first, released docs and examples will steer users onto methods that emit warnings. This was raised in review on PR #352.
This issue covers the hand-written docs and examples in the java-sdk repo. The generated
README.mdis tracked separately in openfga/sdk-generator (its template is the source of truth).Scope
Migrate
disableTransactions(true)totransactions(false)anddisableTransactions(false)totransactions(true), and mode-checks fromoptions.disableTransactions()to!options.isTransactionsEnabled().Javadoc:
src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.javamode-selection prose around lines 415, 424, 469, 478Example projects:
examples/basic-examples/src/main/java/dev/openfga/sdk/example/Example1.java:120examples/basic-examples/src/main/kotlin/dev/openfga/sdk/example/KotlinExample1.kt:120src/test-integration/java/dev/openfga/sdk/example/Example1.java:120Out of scope
README.mdwrite examples (lines 617, 628, 653): generated, fixed via openfga/sdk-generator.OpenFgaClientTest,OpenFgaClientHeadersTest,OpenFgaClientWriteResponseHeadersTest: migrated as part of the deprecation issue, so at least one back-compat test intentionally keepsdisableTransactions.@Deprecatedannotation: separate issue, gated on this one shipping in a release.Acceptance criteria
disableTransactions(...)calls remain inOpenFgaClient.javaJavadoc or in the three example files listed.isTransactionsEnabled().transactions(false)is exactly equivalent to the priordisableTransactions(true)).Sequencing
First step in the deprecation lifecycle. Blocks the deprecation issue: that issue stays blocked until this change is in a published release, not just merged. Tracked in the umbrella issue.
Owner: @curfew-marathon