-
Notifications
You must be signed in to change notification settings - Fork 4
Add C# code snippets to retries documentation #1587
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
Add C# code snippets to retries documentation #1587
Conversation
Co-Authored-By: Niels Swimberghe <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
This looks good, thank you. Can you also add snippets for Ruby and PHP? |
|
Also include it for Swift. Make sure the max retries client options and request options actually exist in the generated SDKs first. |
- Added Swift examples for client-level and request-level retry configuration - Added PHP examples for client-level and request-level retry configuration - Verified retry support exists in generated SDKs before adding examples - Ruby retry support not implemented (parameter exists but not used in RawClient) Co-Authored-By: Niels Swimberghe <[email protected]>
|
I've verified retry support in the generated SDKs and added examples for Swift and PHP. Here's what I found: Verification Results✅ Swift - Retry support confirmed
✅ PHP - Retry support confirmed
✅ C# - Retry support confirmed (from earlier verification)
❌ Ruby - Retry support NOT implemented
Conclusion: I have not added Ruby examples since the retry functionality is not implemented in the generated SDKs. If there's a different Ruby generator version that does support retries, please let me know and I can add examples for it. Changes Made
The documentation has been tested locally with |
|
The highlighted lines sometimes highlight the wrong line in the code samples you added. |
- Changed C# client-level highlight from {3} to {4}
- Changed Swift client-level highlight from {4} to {5}
- Changed PHP client-level highlight from {3} to {4}
- All highlights now correctly point to the maxRetries configuration line
Co-Authored-By: Niels Swimberghe <[email protected]>
kafkas
left a 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.
Swift looks good
Removed blank lines after import statements in C# and PHP client-level
examples to fix line highlighting. The blank lines were causing the
renderer to highlight the wrong line (one line too early).
- C# client-level: Changed from {4} to {3} and removed blank line
- PHP client-level: Changed from {4} to {3} and removed blank line
- Per-request examples were already correct
- Swift examples were already correct
Verified locally with fern docs dev that highlighting now correctly
points to the MaxRetries/maxRetries configuration lines.
Co-Authored-By: Niels Swimberghe <[email protected]>
|
Fixed the line highlighting issue in C# and PHP client-level examples. The problem was that blank lines after the import statements were causing the renderer to highlight one line too early. Changes made:
Verification:
The highlighting now works correctly for all code snippets added. |
|
PHP is looking good. |
The PR preview renderer adds blank lines after import/use statements,
shifting line numbers. Updated highlighting from {3} to {4} to correctly
highlight the maxRetries/MaxRetries configuration line.
Co-Authored-By: Niels Swimberghe <[email protected]>
Add C# code snippets to retries documentation
Summary
Added C# code examples to the retries with backoff documentation page showing how to configure retry limits in the C# SDK. The examples demonstrate:
ClientOptionsRequestOptionsThe C# examples follow the same pattern as the existing TypeScript, Python, Java, and Go examples.
Review & Testing Checklist for Human
MaxRetriesproperty name is correct (notmaxRetriesormax_retries){3}and{2}) points to the correct lines in the rendered documentationTest Plan
fern docs devand navigate to/learn/sdks/deep-dives/retries-with-backoffNotes
/home/ubuntu/repos/fern/seed/csharp-sdk/content-type/src/SeedContentTypes/Core/Public/ClientOptions.csandRequestOptions.csMaxRetriesproperty has a default value of 2 inClientOptionsand is nullable (int?) inRequestOptionsLink to Devin run: https://app.devin.ai/sessions/01db27cf4ef24988b620fff821b1f656
Requested by: Niels Swimberghe ([email protected], @Swimburger)