openapi

Generate OpenAPI 3.1 documentation for .NET 10 endpoints using built-in Microsoft OpenAPI and transformers.

224|87|Updated Dec 15, 2018
One-click install
npx skills add https://github.com/Resgrid/Core --skill openapi-resgrid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openapi
Source: https://github.com/Resgrid/Core/tree/main/.opencode/skills/openapi
Command: npx skills add https://github.com/Resgrid/Core --skill openapi-resgrid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Resiliently generate accurate OpenAPI 3.1 documentation for .NET 10 APIs using the built-in OpenAPI support, avoiding schema gaps that often occur with generic result types or missing endpoint metadata.

Core Features & Use Cases

  • Built-in OpenAPI for .NET 10 — Use Microsoft.AspNetCore.OpenApi with AddOpenApi() and MapOpenApi() instead of Swashbuckle for new projects.
  • TypedResults-driven response schemas — Prefer TypedResults so response schemas are inferred correctly from endpoint return types (especially for union results).
  • Transformers for customization — Apply document transformers, schema transformers, and per-endpoint operation transformers to add security schemes, global responses, deprecations, and schema formatting.
  • First-class metadata — Add .WithName(), .WithSummary(), and tags to improve the spec and downstream client generation.
  • Multi-document support & XML comments — Produce multiple OpenAPI documents and enrich the spec using generated XML documentation comments.

Quick Start

Load this skill when you are setting up .NET 10 API documentation so you can generate OpenAPI 3.1 output with correct schemas, security documentation, and endpoint metadata.

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 in .NET 10 without Swashbuckle?

Generate OpenAPI documentation in .NET 10 without Swashbuckle by using the built-in `AddOpenApi()` and `MapOpenApi()` methods from `Microsoft.AspNetCore.OpenApi` to produce OpenAPI 3.1 specs natively.

Why are my OpenAPI response schemas missing or incomplete for generic endpoint return types?

OpenAPI response schemas are incomplete for generic endpoint return types because the generator cannot infer them accurately. Using `TypedResults` for endpoint return types ensures response schemas are correctly inferred for union results.

How do I add security schemes to my OpenAPI 3.1 document in .NET 10?

Add security schemes to your OpenAPI 3.1 document in .NET 10 by applying document transformers, schema transformers, or per-endpoint operation transformers to customize security schemes and endpoint behavior.

Does built-in .NET 10 OpenAPI generation support multiple output documents?

Yes, built-in .NET 10 OpenAPI generation supports multiple documents. You can produce multiple OpenAPI documents and enrich them using generated XML documentation comments for client-friendly spec output.

What is the best way to enrich endpoint metadata for OpenAPI client generation in .NET 10?

The best way to enrich endpoint metadata for OpenAPI client generation in .NET 10 is using first-class metadata methods like `.WithName()`, `.WithSummary()`, and adding tags to improve the spec and downstream client generation.

When should I use document transformers versus operation transformers for OpenAPI customization?

Use document transformers for global OpenAPI customizations like security schemes and global responses, and use per-endpoint operation transformers for specific endpoint behavior, deprecations, and schema formatting adjustments.