Skip to content

(1 of 5) Update Java README template transaction examples to transactions()/isTransactionsEnabled() #718

Description

@curfew-marathon

Context

openfga/java-sdk PR #352 added an affirmative transaction API to ClientWriteOptions: transactions(boolean) and isTransactionsEnabled(), replacing the double-negative disableTransactions(boolean) / disableTransactions(). The old methods are slated for deprecation once public guidance stops teaching them.

The java-sdk README.md is generated from this repo, so its transaction examples cannot be fixed in java-sdk directly: they would revert on the next generation. The source of truth is the Java README template here.

Scope

config/clients/java/template/README_calling_api.mustache:

  • Line 291: .disableTransactions(false) becomes .transactions(true)
  • Line 302: prose "Passing ClientWriteOptions with .disableTransactions(true) is required to use non-transaction mode" becomes the equivalent for .transactions(false)
  • Line 327: .disableTransactions(true) becomes .transactions(false)

Regenerate java-sdk so README.md (lines 617, 628, 653) picks up the change.

Out of scope

  • docs/GENERATING-A-NEW-SDK.md, which prescribes disableTransactions as a cross-SDK property. The Go, JS, Python, and .NET SDKs use different transaction option shapes today, so renaming the shared spec is a broader cross-SDK design question, not part of this Java-scoped fix.

Acceptance criteria

  • No disableTransactions(...) in README_calling_api.mustache.
  • The chunk-size example still shows .transactionChunkSize(...) alongside .transactions(false), since chunk size only applies when transactions are off.
  • Regenerating java-sdk produces a README.md with no disableTransactions(...) in the write examples, and the diff is limited to those lines.

Sequencing

Part of step 1 (docs), alongside the java-sdk docs/examples issue. Both must ship in a published release before the java-sdk deprecation issue proceeds. Tracked in the java-sdk umbrella issue.

Owner: @curfew-marathon

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions