dotnet-webapi

Design ASP.NET Core Web API endpoints with HTTP semantics and OpenAPI metadata.

2|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/sayedihashimi/copilot-skill-eval --skill dotnet-webapi-sayedihashimi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-webapi
Source: https://github.com/sayedihashimi/copilot-skill-eval/tree/main/examples/aspnet-razor-pages/skills/dotnet-webapi
Command: npx skills add https://github.com/sayedihashimi/copilot-skill-eval --skill dotnet-webapi-sayedihashimi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ASP.NET Core Web API teams often struggle to design endpoints with consistent HTTP semantics, integrated OpenAPI metadata, and reliable global error handling across controllers or minimal APIs.

Core Features & Use Cases

  • Enforces a clear API style (controllers vs minimal APIs) and consistent DTO patterns using sealed records.
  • Provides guidance for implementing OpenAPI metadata on endpoints, error handling middleware, and a service-layer architecture.
  • Applies to common scenarios: adding new endpoints, wiring up OpenAPI, and generating .http test files for validation.

Quick Start

Create a new ASP.NET Core Web API project and implement endpoints following the guidelines in this skill.

Frequently Asked Questions about dotnet-webapi

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

FAQPage Schema
How do I design ASP.NET Core Web API endpoints with consistent HTTP semantics?

To design ASP.NET Core Web API endpoints with consistent HTTP semantics, apply a service-layer architecture using sealed-record DTOs. This ensures reliable global error handling and correct API responses across controllers and minimal APIs.

How do I add OpenAPI metadata to minimal APIs in ASP.NET Core?

You add OpenAPI metadata to minimal APIs by wiring OpenAPI integration within your ASP.NET Core project. This provides built-in endpoint documentation and enables generating .http test files for validation.

What is the best way to structure DTOs in an ASP.NET Core Web API?

The best way to structure DTOs in an ASP.NET Core Web API is using sealed records. This enforces consistent data transfer patterns and immutability while integrating cleanly with a service-layer architecture for endpoint design.

Should I use CancellationToken propagation across all ASP.NET Core API endpoints?

Yes, you should use CancellationToken propagation across all ASP.NET Core API endpoints. It enables your service-layer architecture to gracefully handle aborted client requests and terminate unnecessary processing efficiently.

How do I implement global error handling middleware for an ASP.NET Core Web API?

You implement global error handling for an ASP.NET Core Web API by establishing a unified error-handling middleware strategy. This ensures consistent HTTP semantics and standardized error responses across all controllers and minimal API endpoints.

Can I use this approach for both controllers and minimal APIs in ASP.NET Core?

Yes, you can apply this approach to both controllers and minimal APIs in ASP.NET Core. It enforces a clear API style and unified error-handling strategy regardless of the endpoint pattern chosen for your Web API project.