-
Notifications
You must be signed in to change notification settings - Fork 62
fix(dotnet): update README templates for correct BatchCheck documenta… #663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
config/clients/dotnet/template/README_calling_api.mustache (1)
490-535: Client Batch Check section correctly documents client-side batching approach.This section appropriately distinguishes the client-side batching (
ClientBatchCheck) from the server-side batching (BatchCheck), using different types and response structures. The guidance on when to use each approach is helpful.However, the naming
ClientBatchCheckClientOptions(line 497) has "Client" appearing twice, which may be confusing to developers. Consider whether a clearer name likeClientBatchCheckParallelOptionsorBatchCheckClientOptionswould improve readability.If the SDK allows, consider a clearer naming pattern to distinguish the two option types:
- Current:
ClientBatchCheckOptionsvsClientBatchCheckClientOptions- Alternative:
BatchCheckOptionsvsClientBatchCheckOptions- Or:
ServerBatchCheckOptionsvsClientBatchCheckOptionsThis is purely a naming clarity suggestion and does not affect functionality.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
config/clients/dotnet/template/README_calling_api.mustache(2 hunks)config/common/files/README.mustache(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
config/**/*.mustache
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Validate mustache syntax and variable references across all template files, including CHANGELOG.md.mustache
Files:
config/common/files/README.mustacheconfig/clients/dotnet/template/README_calling_api.mustache
config/**/*.{json,mustache}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Never hardcode API keys or credentials in configuration or template files
Files:
config/common/files/README.mustacheconfig/clients/dotnet/template/README_calling_api.mustache
⏰ 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: build-and-test-java-sdk
- GitHub Check: build-and-test-dotnet-sdk
- GitHub Check: build-and-test-go-sdk
🔇 Additional comments (4)
config/common/files/README.mustache (1)
40-40: LGTM! TOC entry aligns with new documentation section.The new "Client Batch Check" entry is correctly positioned between "Batch Check" and "Expand", and the anchor matches the section header added in the calling API documentation.
config/clients/dotnet/template/README_calling_api.mustache (3)
397-448: BatchCheck example correctly demonstrates new server-side batch API.The example properly uses the new types (
ClientBatchCheckRequest,ClientBatchCheckItem,ContextualTupleKeys) and demonstrates both auto-generated and custom correlation IDs. The structure withContextualTupleKeys.TupleKeyscorrectly addresses the issues mentioned in the PR description.
450-488: Response example accurately reflects new API structure.The response example correctly uses
response.Result(instead ofresponse.Responses) and demonstrates the full response structure including auto-generated and custom correlation IDs, error handling, and contextual tuples placeholders.
384-394: Mustache variables verified and properly defined.All three mustache variables used in this section are correctly defined in
config/common/config.base.jsonwith sensible defaults. Mustache syntax is valid, sections are balanced, and no hardcoded credentials are present. The code changes comply with all applicable coding guidelines.
…tion The README template had incorrect examples for the BatchCheck method that didn't match the actual implementation. Changes: - Fix BatchCheck example to use ClientBatchCheckRequest instead of List<ClientCheckRequest> - Fix contextual tuples to use ContextualTupleKeys instead of ClientTupleKey - Fix response property from Responses to Result - Add server version requirement (OpenFGA v1.8.0+) with link - Add ClientBatchCheck section for client-side parallel checking - Add Client Batch Check to table of contents - Add MaxBatchSize configuration example - Add correlation ID examples (auto-generated and custom) The templates now generate accurate documentation that matches the actual batch-check API implementation.
c0584fb to
b5f5b76
Compare
Fix dotnet SDK README Templates for BatchCheck Documentation
Problem
The README template for the dotnet SDK contained incorrect documentation for the
BatchCheck()method:List<ClientCheckRequest>instead ofClientBatchCheckRequestClientTupleKeyinstead ofContextualTupleKeysfor contextual tuplesresponse.Responsesinstead ofresponse.ResultClientBatchChecksection and table of contents entrySolution
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:
List<ClientCheckRequest>toClientBatchCheckRequestwithCheckspropertyList<ClientTupleKey>toContextualTupleKeyswithTupleKeyspropertyresponse.Responsestoresponse.ResultMaxBatchSizeconfiguration exampleNew Client Batch Check Section:
ClientBatchCheck()methodList<ClientCheckRequest>response.ResponsesBatchCheck()2. config/common/files/README.mustache
Table of Contents:
Result
The generator now produces accurate documentation:
Before:
After:
Testing
Verified that regenerating the dotnet SDK produces correct documentation:
Files Modified
config/clients/dotnet/template/README_calling_api.mustacheconfig/common/files/README.mustacheImpact
This ensures the generated README documentation accurately reflects the batch-check API and prevents confusion for SDK users.
Summary by CodeRabbit
Refactor
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.