-
Notifications
You must be signed in to change notification settings - Fork 545
Fix markdown links in docs and add docfx CI validation #862
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
Co-authored-by: eiriktsarpalis <[email protected]>
Co-authored-by: eiriktsarpalis <[email protected]>
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.
@copilot only change the links please, document content or structure (e.g. lists) should remain faithful to the original.
Co-authored-by: eiriktsarpalis <[email protected]>
Fixed in commit 5cd08ba. Reverted to the original document structure and only updated the link URLs themselves, preserving the reference-style link format at the end of each section. |
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.
@copilot now update all docfx
command line locations (the Makefile and gh-actions yml) so that the --warningAsErrors true
flag is included.
Co-authored-by: eiriktsarpalis <[email protected]>
Added in commit 75feb45. The |
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.
@copilot now that I've added CI validation for doc generation, please fix the outstanding warnings in CI:
/Users/runner/work/csharp-sdk/csharp-sdk/docs/concepts/elicitation/elicitation.md: warning UidNotFound: 2 invalid cross reference(s) "ModelContextProtocol.Server.McpServerExtensions.ElicitAsync*", "ModelContextProtocol.Protocol.ElicitationCapability.ElicitationHandler".
/Users/runner/work/csharp-sdk/csharp-sdk/docs/concepts/elicitation/elicitation.md: Details for invalid cross reference(s): "ModelContextProtocol.Server.McpServerExtensions.ElicitAsync*" in line 14, "ModelContextProtocol.Protocol.ElicitationCapability.ElicitationHandler" in line 34
/Users/runner/work/csharp-sdk/csharp-sdk/docs/concepts/logging/logging.md: warning UidNotFound: 2 invalid cross reference(s) "ModelContextProtocol.Server.McpServerExtensions.AsClientLoggerProvider*", "ModelContextProtocol.Client.McpClientExtensions.SetLoggingLevel*".
/Users/runner/work/csharp-sdk/csharp-sdk/docs/concepts/logging/logging.md: Details for invalid cross reference(s): "ModelContextProtocol.Server.McpServerExtensions.AsClientLoggerProvider*" in line 62, "ModelContextProtocol.Client.McpClientExtensions.SetLoggingLevel*" in line 85
/Users/runner/work/csharp-sdk/csharp-sdk/docs/concepts/progress/progress.md: warning UidNotFound: 1 invalid cross reference(s) "System.Progress`1".
/Users/runner/work/csharp-sdk/csharp-sdk/docs/concepts/progress/progress.md: Details for invalid cross reference(s): "System.Progress`1" in line 60, "System.Progress`1" in line 62
Note that for System.Progress`1 specifically xref's don't work in docfx, instead you need to create a regular markdown link pointing to the learn.microsoft.com website for the corresponding type's API documentation.
Co-authored-by: eiriktsarpalis <[email protected]>
Fixed in commit eb25e5e. Updated all invalid xref cross-references to point to the correct types:
|
Co-authored-by: eiriktsarpalis <[email protected]>
Co-authored-by: eiriktsarpalis <[email protected]>
Fixed CI failures by updating only the link URLs in reference-style link definitions, changing from direct API URLs to xref syntax. The document content and structure remain unchanged - only the link destinations were updated to reference current (non-obsolete) types.
Changes Made
Documentation Fixes
DocFX CI Validation
--warningsAsErrors true
flag to docfx command in Makefile to ensure warnings are treated as errors during documentation generationFixed Invalid xref Cross-References
ElicitAsync
now referencesMcpServer.ElicitAsync*
instead ofMcpServerExtensions.ElicitAsync*
ElicitationHandler
now referencesMcpClientHandlers.ElicitationHandler
instead ofElicitationCapability.ElicitationHandler
AsClientLoggerProvider
now referencesMcpServer.AsClientLoggerProvider*
instead ofMcpServerExtensions.AsClientLoggerProvider*
SetLoggingLevel
now referencesMcpClient.SetLoggingLevel*
instead ofMcpClientExtensions.SetLoggingLevel*
System.Progress<T>
now uses a regular markdown link to learn.microsoft.com with correct syntax (xref doesn't work for this type in DocFX)CI Improvements
The xref syntax allows DocFX to validate references at build time and warn if referenced types are obsolete or missing. With the
--warningsAsErrors
flag, the build will now fail if any documentation warnings are encountered, preventing broken links from being merged.Fixes #861
Original prompt
Fixes #861
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.