fix(dotnet): update README templates for correct BatchCheck documenta…
Fix dotnet SDK README Templates for BatchCheck Documentation
Problem
The README template for the dotnet SDK contained incorrect documentation for the BatchCheck() method:
- Used
List<ClientCheckRequest>instead ofClientBatchCheckRequest - Used
ClientTupleKeyinstead ofContextualTupleKeysfor contextual tuples - Showed
response.Responsesinstead ofresponse.Result - Missing server version requirement
- Missing
ClientBatchChecksection and table of contents entry
Solution
Updated the README templates to generate correct documentation that matches the actual batch-check implementation.
Changes
1. config/clients/dotnet/template/README_calling_api.mustache
Batch Check Section:
- Added server version requirement: "Requires OpenFGA server version 1.8.0 or greater"
- Changed
List<ClientCheckRequest>toClientBatchCheckRequestwithChecksproperty - Changed
List<ClientTupleKey>toContextualTupleKeyswithTupleKeysproperty - Changed
response.Responsestoresponse.Result - Added
MaxBatchSizeconfiguration example - Added correlation ID examples (auto-generated and custom)
- Enhanced response example with proper structure
New Client Batch Check Section:
- Added dedicated section for
ClientBatchCheck()method - Shows correct usage with
List<ClientCheckRequest> - Shows correct response property
response.Responses - Includes guidance on when to use vs
BatchCheck()
2. config/common/files/README.mustache
Table of Contents:
- Added "Client Batch Check" entry to table of contents
Result
The generator now produces accurate documentation:
Before:
var body = new List<ClientCheckRequest>() { ... }; // Wrong for BatchCheck
var response = await fgaClient.BatchCheck(body, options);
// response.Responses = ... // Wrong property
After:
var body = new ClientBatchCheckRequest { // Correct
Checks = new List<ClientBatchCheckItem>() { ... }
};
var response = await fgaClient.BatchCheck(body, options);
// response.Result = ... // Correct property
Testing
Verified that regenerating the dotnet SDK produces correct documentation:
- Server version requirement appears in README
- Correct models used in examples
- Both BatchCheck and ClientBatchCheck sections present
- Examples compile correctly
Files Modified
-
config/clients/dotnet/template/README_calling_api.mustache -
config/common/files/README.mustache
Impact
This ensures the generated README documentation accurately reflects the batch-check API and prevents confusion for SDK users.
Summary by CodeRabbit
-
Refactor
- Batch check API restructured with updated request/response format, including per-item correlation IDs and enhanced error handling.
-
Documentation
- Updated batch check documentation with new usage patterns and examples; added Client Batch Check section to navigation.
✏️ Tip: You can customize this high-level summary in your review settings.
[!IMPORTANT]
Review skipped
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
Walkthrough
The pull request refactors the batch check API from a single-request model to a server-side batch model. Updates include new public types (ClientBatchCheckRequest, ClientBatchCheckItem, ContextualTupleKeys), modified response structures with per-item correlation IDs and error payloads, addition of MaxBatchSize option, and reorganized documentation reflecting the new batch check pathway.
Changes
| Cohort / File(s) | Summary |
|---|---|
dotnet BatchCheck API Documentation config/clients/dotnet/template/README_calling_api.mustache |
BatchCheck API reworked from List<ClientCheckRequest> to ClientBatchCheckRequest input and response.Result output. New types introduced: ClientBatchCheckRequest, ClientBatchCheckItem, ContextualTupleKeys, TupleKey, and extended ClientBatchCheckOptions with MaxBatchSize. Per-item responses now include CorrelationId and structured Error fields. Documentation examples and usage patterns updated to reflect server-side batch behavior and client batch check pathway. |
Common README Table of Contents config/common/files/README.mustache |
"Client Batch Check" entry added to TOC under Relationship Queries, positioned between "Batch Check" and "Expand". |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
- Documentation and template updates primarily focused on reflecting new API structure
- Consistent refactoring pattern across examples and descriptions
- No logic implementation changes; verification focuses on API documentation accuracy and completeness
Suggested reviewers
- rhamzeh
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately describes the main change: updating README templates for correct BatchCheck documentation in the dotnet client. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
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.
Comment @coderabbitai help to get the list of available commands and usage tips.