A
aspnet-minimal-api-openapi
by @githubv
4.5(292)
创建带有适当OpenAPI文档的ASP.NET Minimal API端点,确保接口清晰。
安装方式
npx skills add github/awesome-copilot --skill aspnet-minimal-api-openapicompare_arrows
Before / After 效果对比
1 组使用前
手动为ASP.NET Minimal API端点编写OpenAPI文档耗时且容易出错,导致接口文档不一致。前后端协作效率低下。
使用后
自动创建带有完整OpenAPI文档的ASP.NET Minimal API端点,确保接口定义清晰准确。极大提升前后端协作效率。
SKILL.md
ASP.NET Minimal API with OpenAPI
Your goal is to help me create well-structured ASP.NET Minimal API endpoints with correct types and comprehensive OpenAPI/Swagger documentation.
API Organization
- Group related endpoints using
MapGroup()extension - Use endpoint filters for cross-cutting concerns
- Structure larger APIs with separate endpoint classes
- Consider using a feature-based folder structure for complex APIs
Request and Response Types
- Define explicit request and response DTOs/models
- Create clear model classes with proper validation attributes
- Use record types for immutable request/response objects
- Use meaningful property names that align with API design standards
- Apply
[Required]and other validation attributes to enforce constraints - Use the ProblemDetailsService and StatusCodePages to get standard error responses
Type Handling
- Use strongly-typed route parameters with explicit type binding
- Use
Results<T1, T2>to represent multiple response types - Return
TypedResultsinstead ofResultsfor strongly-typed responses - Leverage C# 10+ features like nullable annotations and init-only properties
OpenAPI Documentation
- Use the built-in OpenAPI document support added in .NET 9
- Define operation summary and description
- Add operationIds using the
WithNameextension method - Add descriptions to properties and parameters with
[Description()] - Set proper content types for requests and responses
- Use document transformers to add elements like servers, tags, and security schemes
- Use schema transformers to apply customizations to OpenAPI schemas
用户评价 (0)
发表评价
效果
易用性
文档
兼容性
暂无评价
统计数据
安装量8.6K
评分4.5 / 5.0
版本
更新日期2026年5月19日
对比案例1 组
用户评分
4.5(292)
5
23%
4
51%
3
23%
2
2%
1
0%
为此 Skill 评分
0.0
兼容平台
🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI
时间线
创建2026年3月16日
最后更新2026年5月19日