web-api

Featured

Build or maintain controller-based ASP.NET Core APIs when the project needs controller conventions, advanced model binding, validation extensions, OData, JsonPatch, or existing API patterns. USE FOR: working on controller-based APIs in ASP.NET Core; needing controller-specific extensibility or conventions; migrating or reviewing existing API controllers and filters. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

Web & Frontend 463 stars 35 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
89
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# ASP.NET Core Web API ## Trigger On - working on controller-based APIs in ASP.NET Core - needing controller-specific extensibility or conventions - migrating or reviewing existing API controllers and filters ## Workflow 1. Use controllers when the API needs controller-centric features, not simply because older templates did so. 2. Keep controllers thin: map HTTP concerns to application services or handlers, and avoid embedding data access and business rules directly in actions. 3. Use clear DTO boundaries, explicit validation, and predictable HTTP status behavior. 4. Review authentication and authorization at both controller and endpoint levels so the API surface is not accidentally inconsistent. 5. Keep OpenAPI generation, versioning, and error contract behavior deliberate rather than incidental. 6. Use `minimal-apis` for new simple APIs instead of defaulting to controllers out of habit. ## Current Upstream Notes - `dotnet/aspnetcore` `v10.0.10` is servicing. It fixes nullable `DescriptionAttribute` handling and duplicate generic-property/reference IDs in OpenAPI generation; controller-based API guidance still depends on conventions, advanced model binding, OData, JsonPatch, and existing filters. - The July 2026 `aspnetcore-10.0` overview keeps controller APIs alongside Minimal APIs rather than replacing them. Use the dedicated routing, OpenAPI, auth, and hosting pages before changing public API contracts. ## Deliver - controller APIs with explicit contracts and pol...

Details

Author
managedcode
Repository
managedcode/dotnet-skills
Created
4 months ago
Last Updated
3 days ago
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Solid

neo-dotnet-webapi

Use this skill when building, debugging, refactoring, or reviewing controller-based ASP.NET Core Web APIs, including ControllerBase, ActionResult<T>, Problem Details, API versioning, global exception handling, DTOs, and OpenAPI behavior.

7 Updated yesterday
Benknightdark
API & Backend Featured

dotnet-webapi

Guides creation and modification of ASP.NET Core Web API endpoints with correct HTTP semantics, OpenAPI metadata, and error handling. USE FOR: adding new API endpoints (controllers or minimal APIs), wiring up OpenAPI/Swagger, creating .http test files, setting up global error handling middleware. DO NOT USE FOR: general C# coding style, EF Core data access or query optimization (use optimizing-ef-core-queries), frontend/Blazor work, gRPC services, or SignalR hubs.

463 Updated 3 days ago
managedcode
Code & Development Featured

aspnet-core

Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET. USE FOR: working on ASP.NET Core apps, services, or middleware; changing auth, routing, configuration, hosting, or deployment behavior; deciding between ASP.NET Core sub-stacks. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

463 Updated 3 days ago
managedcode