aspnet-minimal-api-openapi — скилл для GitHub Copilot: установка
Скилл помогает создавать типизированные ASP.NET Minimal API endpoints с OpenAPI-документацией. Пригодится для новых и расширяемых API.
npx skills add github/awesome-copilot --skill aspnet-minimal-api-openapi -a claude-codeЧто делает aspnet-minimal-api-openapi
Скилл помогает организовать ASP.NET Minimal API через MapGroup(), endpoint filters и отдельные классы endpoints. Для крупных проектов он предлагает feature-based структуру. Запросы и ответы описываются явными DTO или моделями, включая validation attributes, record types и стандартные ошибки через ProblemDetailsService и StatusCodePages.
Для типов ответов используются Results и TypedResults, а route parameters получают явную типизацию. Документация строится на встроенной поддержке OpenAPI в .NET 9: можно задать summary, description, operationId через WithName, описания свойств и параметров, content types, document transformers и schema transformers.
Ставьте его, если GitHub Copilot должен поддерживать структуру Minimal API и OpenAPI-контракт. Для небольшого endpoint без требований к документации этот скилл избыточен.
Какие задачи решает
- создать ASP.NET Minimal API endpoints с OpenAPI
- сгруппировать связанные endpoints через
MapGroup() - описать типы запросов и ответов через DTO
- добавить operationId и описания в OpenAPI
- настроить стандартные ответы об ошибках
Примеры запросов агенту
- Создай ASP.NET Minimal API endpoint для управления заказами и сгруппируй его через `MapGroup()`.
- Добавь для этого endpoint `TypedResults`, validation attributes и OpenAPI operationId через `WithName`.
- Проверь типы ответов и настрой document transformer для security scheme.
Как установить aspnet-minimal-api-openapi
1Через Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill aspnet-minimal-api-openapi -a claude-code2Вручную: положить файлы
~/.claude/skills/aspnet-minimal-api-openapi/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/aspnet-minimal-api-openapi/
Вручную: положить файлы
.agents/skills/aspnet-minimal-api-openapi/SKILL.mdДля всех проектов — ~/.agents/skills/
Вручную: положить файлы
.cursor/skills/aspnet-minimal-api-openapi/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1Через Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill aspnet-minimal-api-openapi2GitHub CLI
gh skill install github/awesome-copilot aspnet-minimal-api-openapi3Вручную: положить файлы
.github/skills/aspnet-minimal-api-openapi/SKILL.mdКомандой платформы
gemini skills install https://github.com/github/awesome-copilot --path skills/aspnet-minimal-api-openapiВручную: положить файлы
.devin/skills/aspnet-minimal-api-openapi/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Похожие
Вопросы о aspnet-minimal-api-openapi
Как установить aspnet-minimal-api-openapi в GitHub Copilot?
Выполните npx skills add github/awesome-copilot --skill aspnet-minimal-api-openapi, затем используйте файл .github/skills/aspnet-minimal-api-openapi/SKILL.md. Также доступна команда gh skill install github/awesome-copilot aspnet-minimal-api-openapi.
Что делает aspnet-minimal-api-openapi?
Скилл помогает проектировать ASP.NET Minimal API endpoints с явными типами, стандартными ошибками и OpenAPI-документацией. Он подсказывает, как организовать endpoints и описать их контракт.
Какие версии .NET поддерживает скилл?
В рекомендациях используется встроенная поддержка OpenAPI, добавленная в .NET 9. Для описания ответов также применяются возможности C# 10+.
Исходный текст
SKILL.md · MIT
--- name: aspnet-minimal-api-openapi description: 'Create ASP.NET Minimal API endpoints with proper OpenAPI documentation' --- # 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
© github · MIT · github/awesome-copilot