aspnet-minimal-api-openapi

Generate ASP.NET Minimal API endpoints with OpenAPI documentation for .NET 9.

Updated Dec 28, 2025
One-click install
npx skills add https://github.com/74nu5/Narratum --skill aspnet-minimal-api-openapi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aspnet-minimal-api-openapi
Source: https://github.com/74nu5/Narratum/tree/main/.github/skills/aspnet-minimal-api-openapi
Command: npx skills add https://github.com/74nu5/Narratum --skill aspnet-minimal-api-openapi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers create robust ASP.NET Minimal API endpoints that are automatically documented with OpenAPI specifications, ensuring clarity and ease of integration.

Core Features & Use Cases

  • Structured API Development: Organize endpoints using MapGroup and separate classes for better maintainability.
  • Type Safety: Define explicit DTOs and use TypedResults for strong typing in requests and responses.
  • Comprehensive Documentation: Automatically generate OpenAPI/Swagger documentation with descriptions, operation IDs, and schema details.
  • Use Case: Quickly scaffold a new set of related API endpoints for user management, complete with validation, clear request/response models, and discoverable documentation for frontend or other service integrations.

Quick Start

Use the aspnet-minimal-api-openapi skill to create a new ASP.NET Minimal API endpoint for retrieving user details by ID, ensuring it returns a UserDto and is documented with OpenAPI.

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 generate OpenAPI documentation for ASP.NET Minimal APIs?

You generate OpenAPI documentation for ASP.NET Minimal APIs by defining explicit DTOs and leveraging type-safe results like TypedResults, which automatically produce schema details and summaries. This approach ensures your endpoints are fully documented and discoverable.

What's the best way to structure a Minimal API web API in C# for maintainability?

The best way to structure a Minimal API in C# for maintainability is organizing endpoints using MapGroup and separate classes. This approach keeps related endpoints grouped logically, ensuring your API remains clean and easy to manage as it scales.

How do I add summaries and operation IDs to my .NET 9 Web API endpoints?

You add summaries, descriptions, and operation IDs to your .NET 9 Web API endpoints by leveraging built-in OpenAPI features during endpoint definition. This allows you to customize schema details directly alongside your route declarations.

Can I use TypedResults in ASP.NET Minimal APIs to enforce type-safe responses?

Yes, you can use TypedResults in ASP.NET Minimal APIs to enforce type-safe responses. By defining explicit DTOs for requests and responses, you ensure strong typing throughout your API, which automatically translates into accurate OpenAPI specifications.

How do I scaffold a set of related Minimal API endpoints for user management?

You scaffold related Minimal API endpoints for user management by using MapGroup to organize routes and defining explicit DTOs for validation and data transfer. This provides clear request and response models with discoverable OpenAPI documentation.

Does this approach to building ASP.NET Minimal APIs support .NET 9 and later?

Yes, this approach to building ASP.NET Minimal APIs supports .NET 9 and later. It leverages the latest OpenAPI features available in these versions, including schema customization, operation IDs, and type-safe results for robust endpoint generation.