github avatar

Aspnet Minimal Api Openapi

The aspnet-minimal-api-openapi skill assists .NET developers in building ASP.NET Minimal API endpoints with comprehensive OpenAPI/Swagger documentation by providing patterns for organizing endpoints, defining strongly-typed request/response models, and generating accurate API schemas. It solves the problem of creating well-documented APIs with minimal boilerplate by leveraging .NET 9's built-in OpenAPI support and C# language features like records and nullable annotations. The skill guides developers through best practices for endpoint grouping, type handling, validation, and documentation generation.

skills.sh installs
9.2K
GitHub stars
41K
last updated
Aug 21, 2026

Install

$ npx -y skills add github/awesome-copilot --skill aspnet-minimal-api-openapi --agent claude-code

Installs into .claude/skills of the current project.

Files

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 TypedResults instead of Results for strongly-typed responses
  • Leverage C# 10+ features like nullable annotations and init-only properties

OpenAPI Documentation

Sponsors

Details

Repository
github.com/github/awesome-copilot
Categories
Backend & APIs, Git & Pull Requests, Documentation, AI & Agent Building, .NET & C#

More from github/awesome-copilot

All 318
1affaan-m avatarapi-designaffaan-m/everything-claude-codeapi design6.9Kskills.sh installs
2binance avataronchain-pay-open-apibinance/binance-skills-hubBinance Onchain Pay enables users to buy cryptocurrency with fiat (e.g., EUR, USD) or send existing crypto from their Binance account directly to any external o6Kskills.sh installs
3affaan-m avatarmysql-patternsaffaan-m/eccMySQL and MariaDB schema, query, indexing, transaction, replication, and connection-pool patterns for production backends.5.7Kskills.sh installs
4affaan-m avatarapi-connector-builderaffaan-m/eccBuild a new API connector or provider by matching the target repo's existing integration pattern exactly. Use when adding one more integration without inventing5.5Kskills.sh installs
5affaan-m avatarmcp-server-patternsaffaan-m/everything-claude-codemcp server patterns4.6Kskills.sh installs
6wordpress avatarwp-interactivity-apiwordpress/agent-skillsUse when building or debugging WordPress Interactivity API features (data-wp-* directives, @wordpress/interactivity store/state/actions, block viewScriptModule 4.5Kskills.sh installs