-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add documentation snippets #3592
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
- Use mdsnippets to get code snippets in markdown from compile-validated code. - Use badges for dependency versions in README. - Add dependency of Microsoft.OpenApi to the README.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3592 +/- ##
=======================================
Coverage 94.28% 94.28%
=======================================
Files 110 110
Lines 3816 3816
Branches 723 723
=======================================
Hits 3598 3598
Misses 218 218
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Remove content that doesn't apply to v9.
Put OpenAPI first (and in bold to indicate the default), and 2.0 for Swagger second.
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.
Pull Request Overview
This PR introduces mdsnippets to extract code snippets from compiled C# code into documentation. It adds compile-validated code examples to markdown documentation, uses version badges for dependencies in the README, and creates a test project containing all the code snippets used throughout the documentation.
- Add mdsnippets tooling to generate compile-validated code snippets in markdown
- Create DocumentationSnippets test project with all example code
- Update README and documentation files with snippet references and dependency version badges
Reviewed Changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/WebSites/DocumentationSnippets/ | New test project containing all code examples used in documentation |
| mdsnippets.json | Configuration file for mdsnippets tool |
| README.md | Updated with snippet references and dependency version badges |
| docs/*.md | Updated documentation files with mdsnippets references |
| .github/workflows/update-documentation.yml | New workflow to automatically update documentation snippets |
| .config/dotnet-tools.json | Added mdsnippets tool configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
test/WebSites/DocumentationSnippets/ApiExplorerGetsOnlyConvention.cs
Outdated
Show resolved
Hide resolved
Fix issues spotted by Copilot.
Cherry-picked from #3283.