
Aspnet Minimal Api Openapi
Scaffold ASP.NET Minimal API endpoints with typed results, validation, and first-class OpenAPI metadata for solo builders shipping .NET 9+ services.
Overview
aspnet-minimal-api-openapi is an agent skill for the Build phase that creates ASP.NET Minimal API endpoints with strongly typed results and comprehensive OpenAPI documentation.
Install
npx skills add https://github.com/github/awesome-copilot --skill aspnet-minimal-api-openapiWhat is this skill?
- MapGroup() organization, endpoint filters, and feature-folder patterns for larger APIs
- Explicit request/response DTOs with validation attributes and ProblemDetails for standard errors
- Strong typing via Results<T>, TypedResults, and nullable-aware C# models
- Built-in .NET 9 OpenAPI: summaries, descriptions, and operationIds via WithName
- Cross-cutting guidance aligned with minimal API best practices rather than controller MVC
Adoption & trust: 8.7k installs on skills.sh; 34.6k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your minimal API endpoints lack consistent DTOs, typed responses, and OpenAPI metadata, so agents and reviewers cannot trust the contract.
Who is it for?
Solo builders shipping .NET 9 minimal APIs who want agent-guided structure instead of one-off route snippets.
Skip if: Teams still on legacy Web API controllers-only workflows with no plan to adopt minimal APIs or built-in OpenAPI.
When should I use this skill?
Create ASP.NET Minimal API endpoints with proper OpenAPI documentation.
What do I get? / Deliverables
You get grouped, validated minimal API endpoints with TypedResults and documented operations ready for Swagger consumers and client codegen.
- Grouped minimal API endpoint definitions
- Request/response DTOs with validation
- OpenAPI-documented operations with names and descriptions
Recommended Skills
Journey fit
Canonical shelf is Build because the skill executes during API implementation, not during idea research or launch distribution. Backend is the right subphase: route groups, DTOs, TypedResults, and OpenAPI operation metadata are server-side API design concerns.
How it compares
Use as a procedural API scaffold skill, not as a generic C# linter or an MCP server that calls GitHub for you.
Common Questions / FAQ
Who is aspnet-minimal-api-openapi for?
Indie and solo developers using Claude Code, Cursor, or Codex to implement ASP.NET Minimal APIs with correct types and OpenAPI-friendly metadata.
When should I use aspnet-minimal-api-openapi?
During Build when adding or refactoring HTTP endpoints, defining DTOs, wiring validation, or filling OpenAPI summaries and operationIds before you integrate a web or mobile client.
Is aspnet-minimal-api-openapi safe to install?
It is guidance-only procedural knowledge; review the Security Audits panel on this Prism page and inspect the skill source in your repo before granting broad agent permissions.
SKILL.md
READMESKILL.md - Aspnet Minimal Api Openapi
# 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 - Use the built-in OpenAPI document support added in .NET 9 - Define operation summary and description - Add operationIds using the `WithName` extension 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