aspnet-minimal-api-openapi

Create ASP.NET Minimal API endpoints with typed responses and OpenAPI documentation.

25|4|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/thangchung/agent-engineering-experiment --skill aspnet-minimal-api-openapi-thangchung
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: aspnet-minimal-api-openapi
Source: https://github.com/thangchung/agent-engineering-experiment/tree/main/agentgateway-entraid-obo/.claude/skills/aspnet-minimal-api-openapi
Command: npx skills add https://github.com/thangchung/agent-engineering-experiment --skill aspnet-minimal-api-openapi-thangchung

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building ASP.NET Minimal APIs often leads to inconsistent endpoint organization, weakly-typed responses, and incomplete OpenAPI/Swagger documentation that frustrates API consumers. ## Core Features & Use Cases - Structured Endpoint Organization: Group related endpoints with MapGroup(), apply endpoint filters for cross-cutting concerns, and use feature-based folder structures for larger APIs. - Strongly-Typed Contracts: Define explicit request/response DTOs with validation attributes, record types, and TypedResults with Results<T1, T2> for multiple response types. - Comprehensive OpenAPI Documentation: Use .NET 9 built-in OpenAPI support with operation summaries, WithName operationIds, [Description] attributes, and document/schema transformers for servers, tags, and security schemes. - Use Case: When scaffolding a new REST API in .NET 9, use this Skill to generate endpoints that return strongly-typed results and produce a complete, accurate Swagger document automatically. ## Quick Start Create a Minimal API endpoint group for managing products with typed request and response models and full OpenAPI documentation.

Frequently Asked Questions about aspnet-minimal-api-openapi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add OpenAPI documentation to ASP.NET Minimal APIs?▼

Use the built-in OpenAPI support in .NET 9 with operation summaries, descriptions, and the WithName extension method to set operationIds. Add [Description] attributes to properties and parameters, and use document transformers for servers, tags, and security schemes.

How to return strongly-typed responses from Minimal API endpoints?▼

Return TypedResults instead of Results for strongly-typed responses, and use Results<T1, T2> to represent multiple possible response types. This gives the OpenAPI generator accurate response schemas for each status code.

Does ASP.NET Minimal API support endpoint grouping?▼

Yes, use the MapGroup() extension to group related endpoints under a common route prefix. You can apply endpoint filters to groups for cross-cutting concerns like validation or logging, and organize larger APIs with separate endpoint classes.

How do I get standard error responses in Minimal APIs?▼

Use the ProblemDetailsService and StatusCodePages middleware to produce standard RFC 7807 problem details responses. Combine this with validation attributes like [Required] on your DTOs to enforce constraints consistently.

When should I use record types for API models in ASP.NET?▼

Use record types for immutable request and response objects, combined with C# 10+ features like nullable annotations and init-only properties. Records provide value-based equality and concise syntax ideal for DTOs.