Adding web api skill and tests#565
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new dotnet-webapi skill under the dotnet-aspnet plugin, along with evaluation scenarios to validate endpoint creation guidance (minimal APIs vs controllers), OpenAPI wiring, and centralized error handling.
Changes:
- Added
dotnet-webapiskill documentation covering API style detection, DTO conventions, OpenAPI configuration, and global error handling. - Added
dotnet-webapieval test suite with three scenarios targeting minimal APIs, ProblemDetails-based exception handling, and controller-based extensions.
Show a summary per file
| File | Description |
|---|---|
plugins/dotnet-aspnet/skills/dotnet-webapi/SKILL.md |
New skill definition and guidance for ASP.NET Core Web API endpoint creation, OpenAPI metadata, DTOs, and error handling. |
tests/dotnet-aspnet/dotnet-webapi/eval.yaml |
New skill-validator evaluation scenarios and rubrics for the dotnet-webapi skill. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
skill validator results |
|
@BrennanConroy in this PR I fixed the two comments you left on my previous PR |
|
@ManishJayaswal @danmoseley the PR has been reviewed and approved, can we get this merged? |
|
Adding @AbhitejJohn |
|
@BrennanConroy can you merge the PR? |
|
No, it has a missing required check. |
@AbhitejJohn there is a required check pending, |
|
I made a mistake when I opened this PR from a fork, using a fork prevents the GitHub Actions from running. I've created a new PR #613. The actions are currently running. |
Adds the dotnet-webapi skill to the dotnet-aspnet plugin. This skill guides the creation and modification of ASP.NET Core Web API endpoints with correct HTTP semantics, OpenAPI metadata, and error handling.
I'm running the skill validator now and I will add the results as a comment when it completes.
This PR replaces the closed PR #493
What's included
New skill:
plugins/dotnet-aspnet/skills/dotnet-webapi/SKILL.mdA comprehensive skill covering the following areas:
sealed recordDTOs with proper naming conventions (CreateXxxRequest,XxxResponse), XML doc comments, andDateTimeOffsetfor timestamps.TypedResultswith explicitResults<T1, T2>return types,CancellationTokenforwarding, and OpenAPI endpoint metadata (WithName,WithSummary,WithDescription).[ApiController]conventions withActionResult<T>return types andProducesResponseTypeattributes.AddOpenApi()/MapOpenApi()instead of Swashbuckle; includes XML doc comment integration andJsonStringEnumConverterfor enum serialization.IExceptionHandlerwith RFC 7807ProblemDetails, exception-to-status-code mapping, and a sealed handler class in aMiddleware/folder..httptest files — Generates test files for verifying endpoints directly from the IDE.@mikekistler @BrennanConroy