openapi

Generate OpenAPI documentation for .NET 10 APIs using transformers and TypedResults.

1|Updated Apr 28, 2026
One-click install
npx skills add https://github.com/Trossitec/dotnet-claude-kit --skill openapi-trossitec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openapi
Source: https://github.com/Trossitec/dotnet-claude-kit/tree/main/skills/openapi
Command: npx skills add https://github.com/Trossitec/dotnet-claude-kit --skill openapi-trossitec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of producing correct, client-friendly OpenAPI documentation for .NET 10 APIs, especially when developers rely on outdated Swagger tooling or omit metadata needed for reliable schemas and operation IDs.

Core Features & Use Cases

  • Built-in OpenAPI for .NET 10: Uses Microsoft.AspNetCore.OpenApi with AddOpenApi and MapOpenApi, avoiding Swashbuckle for new projects.
  • Schema-accurate responses via TypedResults: Ensures OpenAPI response schemas are inferred correctly from strongly typed union return types, including ValidationProblem and problem details.
  • Transformers for advanced customization: Applies document, operation, and schema transformers to add security schemes, global documentation structure, deprecations, YAML output, and JSON schema tweaks.
  • Endpoint metadata enforcement: Promotes consistent use of WithName, WithSummary, WithDescription, and tags so operationId/client generation stays high quality.
  • Multi-document support and build-time generation: Supports multiple documents (e.g., public/internal) and build-time OpenAPI spec output without runtime hacks.

Quick Start

Enable built-in OpenAPI by adding AddOpenApi in your builder and calling MapOpenApi in development so your app serves the generated OpenAPI document.

Frequently Asked Questions about openapi

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

FAQPage Schema
How do I generate OpenAPI documentation for .NET 10 without Swashbuckle?

To generate OpenAPI documentation for .NET 10 without Swashbuckle, use the built-in Microsoft.AspNetCore.OpenApi library by calling AddOpenApi in your builder and MapOpenApi in your development pipeline.

Why are my .NET OpenAPI response schemas missing or incorrect?

OpenAPI response schemas are often incorrect when using untyped Results. You must use TypedResults in your minimal APIs so the schema is inferred correctly from strongly typed union return types like ValidationProblem.

How do I add security schemes to OpenAPI documents in .NET 10?

You add security schemes to OpenAPI documents in .NET 10 by applying document, operation, and schema transformers during the AddOpenApi setup to customize global structure and security definitions.

Can I generate OpenAPI specs at build time in .NET 10?

Yes, you can generate OpenAPI specs at build time in .NET 10. The built-in Microsoft.AspNetCore.OpenApi package supports multi-document output and build-time spec generation without relying on runtime hacks.

What endpoint metadata is required for reliable client generation from .NET OpenAPI?

Reliable client generation from .NET OpenAPI requires endpoint metadata such as WithName, WithSummary, WithDescription, and tags to ensure high-quality operation IDs and consistent documentation structure.

Does Swashbuckle work with .NET 10 minimal APIs?

While Swashbuckle may technically run, using it for .NET 10 minimal APIs is considered a deprecated and ineffective pattern compared to the built-in Microsoft.AspNetCore.OpenApi package designed for this purpose.