Index of every page on this site: llms.txt
All skills
github avatar

/aspnet-minimal-api-openapi

@f10fdb8 official
by githubgithub/awesome-copilot41k stars
5,399
Run it yourself

Create ASP.NET Minimal API endpoints with proper OpenAPI documentation

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/aspnet-minimal-api-openapi

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈25 tokens for metadata: the name and description. ≈407 when used: this file.

Description uses 1.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈99 characters, or 1.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

ASP.NET Minimal API with OpenAPI

Your goal is to help me create well-structured ASP.NET Minimal API endpoints with correct types and comprehensive OpenAPI/Swagger documentation.

API Organization

  • Group related endpoints using MapGroup() extension
  • Use endpoint filters for cross-cutting concerns
  • Structure larger APIs with separate endpoint classes
  • Consider using a feature-based folder structure for complex APIs

Request and Response Types

  • Define explicit request and response DTOs/models
  • Create clear model classes with proper validation attributes
  • Use record types for immutable request/response objects
  • Use meaningful property names that align with API design standards
  • Apply [Required] and other validation attributes to enforce constraints
  • Use the ProblemDetailsService and StatusCodePages to get standard error responses

Type Handling

  • Use strongly-typed route parameters with explicit type binding
  • Use Results<T1, T2> to represent multiple response types
  • Return TypedResults instead of Results for strongly-typed responses
  • Leverage C# 10+ features like nullable annotations and init-only properties

OpenAPI Documentation

  • Use the built-in OpenAPI document support added in .NET 9
  • Define operation summary and description
  • Add operationIds using the WithName extension method
  • Add descriptions to properties and parameters with [Description()]
  • Set proper content types for requests and responses
  • Use document transformers to add elements like servers, tags, and security schemes
  • Use schema transformers to apply customizations to OpenAPI schemas

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2mo5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides standard development guidelines for creating ASP.NET Minimal APIs and OpenAPI documentation. No security issues were detected.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer8mo

    1/1 file flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at f10fdb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 9 months ago
  • aspnet
  • minimal-api
  • openapi
  • swagger
  • csharp
  • api-documentation
  • dto
  • validation
  • typed-results

README badge

README badge for github/awesome-copilot/aspnet-minimal-api-openapi

Generates ASP.NET Minimal API endpoints with OpenAPI documentation, using strongly-typed DTOs, validation attributes, and .NET 9 built-in OpenAPI support. Targets well-structured APIs with proper Swagger schema generation, request/response modeling, and cross-cutting concern handling via endpoint filters.

Generated from the current SKILL.md.

Does this skill work with .NET versions before 9?
The skill emphasizes .NET 9's built-in OpenAPI document support, but the core patterns (Minimal APIs, MapGroup, TypedResults) work in .NET 6+. You may need to use third-party libraries like Swashbuckle for OpenAPI generation on earlier versions.
Does this cover request validation?
Yes. The skill recommends using validation attributes like [Required] on DTOs and applying the ProblemDetailsService for standardized error responses.
How does this handle endpoints that return multiple response types?
The skill uses Results<T1, T2> and strongly-typed TypedResults to represent multiple possible response types in a single endpoint.
Does this skill address API authentication or security?
The skill mentions using document transformers to add security schemes to OpenAPI, but does not provide detailed implementation patterns for authentication middleware or authorization.

Generated from the current SKILL.md. These answers refresh after source changes.