Skip to content

Conversation

@daniel-jonathan
Copy link
Contributor

@daniel-jonathan daniel-jonathan commented Nov 6, 2025

Update .NET SDK BatchCheck Documentation

Summary

Updates the documentation to reflect that the .NET SDK now supports server-side BatchCheck functionality (implemented in openfga/dotnet-sdk#150).

Changes

Documentation Pages Updated

1. docs/content/getting-started/perform-check.mdx

  • Added .NET SDK (>=v0.9.0) to the list of SDKs supporting server-side BatchCheck
  • Removed "Support in the other SDKs is being worked on" (no longer accurate)
  • Cleaned up explanation to focus on SDKs that have the feature

2. docs/content/interacting/relationship-queries.mdx

  • Added .NET SDK (>=v0.9.0) to the supported SDKs list
  • Removed "Support for .NET is in progress and coming soon"
  • Removed outdated paragraph explaining .NET SDK limitations

3. src/components/Docs/SnippetViewer/BatchCheckRequestViewer.tsx

  • Updated .NET SDK example to show server-side BatchCheck API
  • Changed from client-side parallel checks to server-side /batch-check endpoint
  • Updated to use ClientBatchCheckItem with CorrelationId property
  • Added MaxBatchSize and MaxParallelRequests options
  • Removed misleading version requirement comment

Technical Details

The .NET SDK example now demonstrates:

  • Using ClientBatchCheckRequest with ClientBatchCheckItem list
  • Setting correlation IDs for each check
  • Configuring MaxBatchSize (default: 50) and MaxParallelRequests (default: 10)
  • Accessing results by correlation ID in the response

Before vs After

Before

// The .NET SDK does not yet support server-side batch checks...
var body = new ClientBatchCheckRequest {
  Checks = new List<ClientCheckRequest>() { ... }
}

After

var body = new ClientBatchCheckRequest {
  Checks = new List<ClientBatchCheckItem> {
    new() {
      User = "...",
      Relation = "...",
      Object = "...",
      CorrelationId = "..."
    }
  }
};

Related PRs

Files Changed

  • docs/content/getting-started/perform-check.mdx
  • docs/content/interacting/relationship-queries.mdx
  • src/components/Docs/SnippetViewer/BatchCheckRequestViewer.tsx

Summary by CodeRabbit

  • Documentation
    • .NET SDK (v0.9.0+) now supported for BatchCheck operations
    • Code examples updated across all SDKs with enhanced request/response payload structures

- Add .NET SDK to supported SDKs list for BatchCheck
- Update BatchCheckRequestViewer with server-side example
- Remove outdated 'coming soon' text for .NET support
- Show ClientBatchCheckItem usage with correlation IDs
@daniel-jonathan daniel-jonathan requested review from a team as code owners November 6, 2025 14:41
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 6, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes add .NET SDK support for server-side BatchCheck with updated payload structures including CorrelationId and ContextualTuples across multiple language examples, and update documentation to reflect this support starting from v0.9.0.

Changes

Cohort / File(s) Change Summary
Documentation Updates
docs/content/getting-started/perform-check.mdx, docs/content/interacting/relationship-queries.mdx
Added .NET SDK (≥ v0.9.0) to the BatchCheck supported SDKs list, replacing "coming soon" placeholders. Removed descriptive blocks explaining client-side vs server-side behavior and replaced with concise statements noting server-side BatchCheck availability and ClientBatchCheck method renaming in supporting SDKs.
BatchCheck Request/Response Structures
src/components/Docs/SnippetViewer/BatchCheckRequestViewer.tsx
Expanded DOTNET_SDK and other language examples to reflect updated server-side BatchCheck payload shapes: replaced simple CheckRequest with ClientBatchCheckItem including CorrelationId, added ContextualTuples as List, introduced Context field serialization, updated batching options (MaxBatchSize, MaxParallelRequests), changed response mapping from Responses to Result field, and adjusted per-item Request construction to use object-style syntax across JS, GO, Python, Java, CURL, and RPC language sections.

Sequence Diagram(s)

The changes preserve the existing control flow (build body → call batchCheck → map results) and focus on data structure updates rather than introducing new interactions or control paths.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas requiring extra attention:
    • Payload structure correctness for each language variant (DOTNET, JS, GO, Python, Java, CURL, RPC) to ensure CorrelationId, ContextualTuples, and Context serialization are properly formatted across all language examples
    • Response mapping changes from Responses to Result field—verify consistency across language examples
    • Verification that the updated structures align with the actual .NET SDK v0.9.0+ API surface

Possibly related PRs

Suggested reviewers

  • ttrzeng
  • ewanharris

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating documentation for .NET SDK BatchCheck support, which is the primary objective across all modified files.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

PR Preview Action v1.6.2

🚀 View preview at
https://openfga.github.io/openfga.dev/pr-preview/pr-1141/

Built to branch gh-pages at 2025-12-01 16:59 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/Docs/SnippetViewer/BatchCheckRequestViewer.tsx (1)

324-334: Adjust Java .context(...) generation.

The Java branch now injects raw JSON literals (.context({...})), which is invalid Java syntax and will not compile. The snippet should instead render a real Map (e.g., .context(Map.of("key", value))) or another supported structure from the SDK. Please update the generator accordingly.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 257c525 and 83efa6b.

📒 Files selected for processing (3)
  • docs/content/getting-started/perform-check.mdx (1 hunks)
  • docs/content/interacting/relationship-queries.mdx (1 hunks)
  • src/components/Docs/SnippetViewer/BatchCheckRequestViewer.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: deploy-preview
  • GitHub Check: markdown-link-check-md
  • GitHub Check: Test deployment

- Change .NET SDK from '>= v0.9.0' to 'upcoming in v0.9.0' (v0.9.0 not released yet)
- Remove invalid Context property rendering in .NET example
- Context serialization to C# Dictionary was invalid, removed for now
- Documentation now accurate and examples are compilable

Addresses feedback in PR #1141
ttrzeng
ttrzeng previously approved these changes Nov 6, 2025
@ttrzeng ttrzeng dismissed their stale review November 10, 2025 16:36

wrong click

@ttrzeng ttrzeng self-requested a review November 10, 2025 16:36
Fixes CI formatting check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants