Add authentication options to the DocFX code snippets - #4935
Merged
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
pepone
approved these changes
Sep 11, 2026
InsertCreativityHere
approved these changes
Sep 11, 2026
InsertCreativityHere
left a comment
Member
There was a problem hiding this comment.
Looks good to me!
Member
There was a problem hiding this comment.
Seems like this name MetricsMiddlewareExamples is a leftover copy-paste.
This isn't introduced by your PR, but thought I'd point it out since we're touching this code anyways.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4823.
The DocFX code snippets that create a
Serverpassed no server authentication options, and the default transport(QUIC) requires a server certificate. The snippets that create a
ClientConnectiontoicerpc://localhostpassed noclient authentication options either, so they built but could not connect.
This PR applies the pattern of the src README samples to all 16 regions: the server regions load the test server
certificate and pass
serverAuthenticationOptions, and the client regions load the test root CA and passclientAuthenticationOptions. Both call theCreateServerAuthenticationOptions/CreateClientAuthenticationOptionshelpers fromexamples/common/Program.Authentication.cs, which the docfx exampleprojects now compile in, so the snippets stay in sync with the real helpers. A single two-line comment explains why
the certificate is there and where the helper lives, and the
Server/ClientConnectionconstruction itself carriesno comment.
Two pre-existing slips in
CompressorMiddlewareExamples.csare fixed along the way: the middleware region created anunused client connection, and the file was in the
IceRpc.Telemetry.Examplesnamespace.What's Changed
None — DocFX code snippets only.
🤖 Generated with Claude Code