Add aspnet-openapi skill (#dotnet-aspnet)#486
Open
raihanmehran wants to merge 9 commits intodotnet:mainfrom
Open
Add aspnet-openapi skill (#dotnet-aspnet)#486raihanmehran wants to merge 9 commits intodotnet:mainfrom
raihanmehran wants to merge 9 commits intodotnet:mainfrom
Conversation
Author
|
@dotnet-policy-service agree |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new aspnet-openapi skill to the dotnet-aspnet plugin to guide ASP.NET Core OpenAPI setup and migration (built-in Microsoft.AspNetCore.OpenApi vs Swashbuckle/NSwag), with supporting reference docs and eval scenarios.
Changes:
- Added
aspnet-openapiskill documentation with end-to-end setup guidance (Scalar/Swagger UI), endpoint annotation patterns, JWT security scheme via transformers, and production-hardening guidance. - Added reference docs covering transformer/filter equivalents and a Swashbuckle→built-in migration walkthrough.
- Added an eval suite with 4 scenarios to validate common OpenAPI setup/migration behaviors and pitfalls.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/dotnet-aspnet/aspnet-openapi/eval.yaml | Adds eval scenarios for built-in OpenAPI + Scalar, Swashbuckle empty-spec pitfall, JWT scheme transformer, and migration flow. |
| plugins/dotnet-aspnet/skills/aspnet-openapi/SKILL.md | New primary skill workflow doc for OpenAPI technology selection, setup, UI integration, transformers, and securing spec endpoints. |
| plugins/dotnet-aspnet/skills/aspnet-openapi/references/transformers.md | Reference patterns for document/operation/schema transformers and Swashbuckle filter equivalents. |
| plugins/dotnet-aspnet/skills/aspnet-openapi/references/swashbuckle-migration.md | Step-by-step migration guide including mapping table and post-migration troubleshooting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
plugins/dotnet-aspnet/skills/aspnet-openapi/references/swashbuckle-migration.md
Outdated
Show resolved
Hide resolved
6e44be4 to
a802f80
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fully-qualify System.Reflection.Assembly in Swashbuckle XML docs snippet (Assembly.GetExecutingAssembly is not in default global usings) - Add 'using Microsoft.OpenApi.Models' to the transformer registration snippet in references/transformers.md (OpenApiContact/OpenApiInfo are not in default global usings)
b6cf426 to
b4520f2
Compare
Author
|
@copilot review this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
aspnet-openapiskill to thedotnet-aspnetplugin covering OpenAPI documentation for ASP.NET Core APIs. This is a high-frequency, high-confusion area, .NET 9 replaced Swashbuckle as the default in project templates, leaving developers with contradictory guidance across tutorials, and the technology-selection and migration decisions are non-obvious without prior experience.What's included
SKILL.md— Full workflow covering:Microsoft.AspNetCore.OpenApi(.NET 9+) vs Swashbuckle vs NSwag, with a clear decision tableAddEndpointsApiExplorer()omission)Produces<T>,ProducesProblem,ExcludeFromDescription)IOpenApiDocumentTransformerreferences/transformers.md— Document, operation, and schema transformer patterns; OAuth2 and API key schemes; SwashbuckleIDocumentFilter/IOperationFilterequivalentsreferences/swashbuckle-migration.md— Step-by-step migration guide from Swashbuckle including filter→transformer mapping, behavioral differences table, and common post-migration failurestests/dotnet-aspnet/aspnet-openapi/eval.yaml— 4 eval scenarios covering basic setup, the Swashbuckle empty-spec gotcha, JWT security scheme configuration, and full Swashbuckle migrationMotivation
dotnet-aspnetcurrently has a single skill (minimal-api-file-upload). OpenAPI is arguably the most universally needed capability for any HTTP API, every team configures it, and the .NET 9 ecosystem shift means existing documentation and tutorials are inconsistent. This is a clear LLM gap: agents routinely suggest the wrong package for the target framework, omitAddEndpointsApiExplorer(), or produce security scheme configuration that doesn't match the built-in package's transformer API.