dotnet-minimal-apis
/dotnet-minimal-apis
Buduje minimalne API ASP.NET Core z grupami endpointów, filtrami i typowanymi wynikami oraz pomaga wybrać między minimal APIs a kontrolerami MVC.
- Autor
- Amey-Thakur ↗
- Repozytorium
- AI-SKILLS ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 05.09.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 05.09.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Buduje minimalne API ASP.NET Core z grupami endpointów, filtrami i typowanymi wynikami oraz pomaga wybrać między minimal APIs a kontrolerami MVC.
Oryginalny opis (EN)
Build ASP.NET Core minimal APIs with organized endpoint groups, filters, typed results, and a clear line to MVC. Use when structuring .NET HTTP services or deciding between minimal APIs and controllers.
Jak działa
- Method
- Boundaries
Podgląd SKILL.md
---
name: dotnet-minimal-apis
description: Build ASP.NET Core minimal APIs with organized endpoint groups, filters, typed results, and a clear line to MVC. Use when structuring .NET HTTP services or deciding between minimal APIs and controllers.
---
# .NET minimal APIs
Minimal APIs strip the ceremony from HTTP endpoints; the risk is the
ceremony was holding the structure. Keep the structure (grouping,
validation, typed contracts) and enjoy the brevity.
## Method
1. **Organize by feature groups, not one Program.cs.** Each feature
exposes an extension method mapping its group:
`app.MapGroup("/orders").MapOrders()` with the handlers in that
feature's folder (vertical slices; see go-project-layout's
domain-first instinct). Program.cs stays a composition root:
builder config, DI registrations (see
dotnet-dependency-injection), middleware order, group mapping.
A 500-line Program.cs is the new God-controller.
2. **Keep handlers thin, logic injectable.** Handler = bind, call a
service, translate the result: parameters injected by type
(services, route/query/body values), logic living in plain
testable classes (see spring-boot-discipline's identical split).
Handlers taking eight parameters or containing branching business
rules have absorbed a service's job.
3. **Return TypedResults, declare the contract.**
`Results<Ok<OrderDto>, NotFound, ValidationProblem>` as the
return type: compile-checked status codes and automatic OpenAPI
metadata (see openapi-contracts) without attribute confetti.
Error responses go through the problem-details machinery
(`AddProblemDetails`, exception handler middleware) so failures
share one shape (see api-error-responses).
4. **Put cross-cutting behavior in endpoint filters, per group.**
Validation (running the request DTO through your validator:
see request-validation), idempotency keys on the mutation group
(see idempotency-keys), tenant resolution (see multi-tenancy):
as filters on the narrowest group that needs them, not global
middleware with route sniffing. Auth policies attach at the
group (`RequireAuthorization("policy")`; see authz-design),
rate limits likewise (see rate-limiting).
5. **Bind and validate at the edge.** Route/query binding for
simple values, `[AsParameters]` records for grouped inputs,
explicit DTOs for bodies: never bind domain entities directly
(over-posting; see request-validation's reject-unknown rule).
Validation failures return 400/422 problem responses from the
filter, before any handler runs.
6. **Know when controllers still earn their keep.** Heavy
content-negotiation, action-filter ecosystems you already own,
ApiController conventions a large team has internalized, or
generated clients tightly coupled to MVC metadata. New services
default minimal; mixed apps host both side by side during
migration rather than rewriting for style points (see
rewrite-vs-refactor).
## Boundaries
- Minimal APIs are still the full ASP.NET pipeline: middleware
order, DI lifetimes, and async rules apply unchanged (see
dotnet-async); "minimal" describes the routing surface, not the
runtime.
- Endpoint filters run per-endpoint after routing; concerns that
must see every request including unrouted ones (logging,
security headers: see security-headers) remain middleware.
- OpenAPI generation is only as good as your TypedResults and
metadata honesty; an endpoint returning untyped `Results` erases
the contract clients generate against (see api-change-management).
Wersje
W bazie nie ma innych skilli o nazwie dotnet-minimal-apis.
Migawka bazy z 28.10.2026 · wersja paczki 4c629d2c4b64 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 90neo-dotnet-minimal-apis
Pomaga budować, debugować i recenzować Minimal APIs w ASP.NET Core: grupy tras, filtry endpointów, typed results, metadane OpenAPI i wydajne usługi API bez kontrolerów. - 100minimal-apis
Projektuje i implementuje Minimal APIs w ASP.NET Core z endpointami zorientowanymi na handler, grupami tras i filtrami oraz pomaga wybrać między nimi a kontrolerami. - 100minimal-api-endpoint-scaffolder
Generuje endpointy ASP.NET Core Minimal API we wzorcu REPR z walidacją, typowanymi wynikami i grupami tras, także przy konwersji kontrolerów na minimal API. - 100neo-dotnet
Rozpoznaje kształt projektu .NET, uruchamia lub poleca polecenia .NET CLI i kieruje do właściwych skilli, takich jak Minimal APIs, Web API, MVC, EF Core i C#. - 100dotnet-web-apps
Pomaga wybrać i wdrożyć wzorce aplikacji webowych .NET: MVC, Razor Pages, Minimal APIs i Blazor, wraz z architekturą, strukturą projektu i routingiem w ASP.NET Core. - 100dotnet-core-expert
Pomaga budować aplikacje .NET Core o architekturze cloud-native, wydajne mikroserwisy, nowoczesne wzorce C# i wdrożenia wieloplatformowe z minimal APIs i funkcjami ASP.NET Core.