dotnet-webapi

Creates ASP.NET Core Web API endpoints with RFC 7 error handling and OpenAPI metadata.

1|Updated May 21, 2026
One-click install
npx skills add https://github.com/1k-off/umbraco-observability-playground --skill dotnet-webapi-1k-off
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-webapi
Source: https://github.com/1k-off/umbraco-observability-playground/tree/main/.agents/skills/dotnet-webapi
Command: npx skills add https://github.com/1k-off/umbraco-observability-playground --skill dotnet-webapi-1k-off

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of writing ASP.NET Core Web API endpoints that consistently return the right HTTP status codes, generate accurate OpenAPI/Swagger documentation, and handle errors safely and uniformly.

Core Features & Use Cases

  • Endpoint design with correct HTTP semantics: Choose controller vs minimal API patterns, apply consistent status codes, and ensure POST creates use 201 Created with a Location header.
  • API-ready DTOs with OpenAPI quality: Use sealed record request/response types, enforce immutability, add XML doc summaries for richer OpenAPI output, and use DateTimeOffset for date/time fields.
  • Global error handling and request validation: Add centralized exception-to-ProblemDetails mapping and ensure minimal APIs have explicit validation wiring where applicable.
  • Developer ergonomics: Provide conventions for TypedResults, enum string serialization, CancellationToken propagation, and add a root-level .http test file for manual verification.

Quick Start

Ask the AI: “Create a new ASP.NET Core Web API endpoint that follows existing controller/minimal API conventions, uses sealed DTOs with XML summaries, returns correct status codes with ProblemDetails on errors, and updates OpenAPI plus a matching .http test request.”

Frequently Asked Questions about dotnet-webapi

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

FAQPage Schema
How do I return correct HTTP status codes and ProblemDetails errors in an ASP.NET Core Web API?

ASP.NET Core Web API endpoints should use centralized exception-to-ProblemDetails mapping for global error handling and ensure POST creates return 201 Created with a Location header. This approach enforces consistent status code behavior and uniform RFC 7807 error responses across both controller-based and minimal API styles.

How do I generate accurate OpenAPI Swagger documentation for minimal APIs?

Generating accurate OpenAPI Swagger documentation for minimal APIs requires using TypedResults for endpoint inference and adding XML doc summaries to sealed record DTOs. This ensures immutability and produces richer OpenAPI output with proper request and response schema definitions.

What is the best way to structure request and response DTOs for ASP.NET Core Web APIs?

The best way to structure request and response DTOs for ASP.NET Core Web APIs is using sealed record types. This enforces immutability, supports enum string serialization, and leverages DateTimeOffset for date/time fields, resulting in API-ready DTOs with high-quality OpenAPI schema generation.

Does ASP.NET Core Web API support CancellationToken propagation in minimal APIs?

Yes, ASP.NET Core Web API supports CancellationToken propagation in minimal APIs. You must explicitly wire CancellationToken support into endpoint definitions to ensure long-running operations can be safely aborted and follow consistent developer ergonomics conventions.

How do I test ASP.NET Core Web API endpoints manually with .http files?

You test ASP.NET Core Web API endpoints manually with .http files by adding a root-level .http test file to the project. This provides a matching test request for manual verification of new RESTful operations, validating correct HTTP semantics and status code behavior directly from your development environment.