本文へスキップ
Skillpedia
APIとサーバー(バックエンド)40k · #7067

aspnet-minimal-api-openapi

できること

このツールは、ASP.NETを使ったウェブサイトやウェブアプリケーション用のコードの断片を作成するのに役立ちます。送受信される情報が整理され、マニュアルのようなドキュメントが分かりやすく完全になるようにします。

使う場面

  • ✓ウェブサイトに新しい機能を作成する必要があるとき。
  • ✓ウェブアプリケーションの複数の部分を整理するとき。
  • ✓コードのドキュメントを常に最新の状態に保ちたいとき。

スキルのリンク

https://github.com/github/awesome-copilot/blob/main/skills/aspnet-minimal-api-openapi/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/github/awesome-copilot/blob/main/skills/aspnet-minimal-api-openapi/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“名前とメールアドレスを受け取って新しいユーザーを登録し、作成されたユーザーのIDを返すエンドポイントを作成してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

必要な受信データと、返すべきデータを説明します。ツールがそれを整理し、他の開発者にとっての地図のような役割を果たすドキュメントを自動で生成します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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
よくある質問

「エンドポイント」とは何ですか?

アプリケーションが特定の情報を送受信するための入口のようなものです。

「OpenAPI/Swagger」とは何ですか?

API(前述の「入口」)を記述し、ドキュメント化するための標準的な方法です。他の人がどのように使えばよいかを理解できるようにします。

「DTO/モデル」とは何ですか?

アプリケーションが送受信するときに、データをどのように整理するかを定義する構造のことです。

詳細

作者による元の説明

Create ASP.NET Minimal API endpoints with proper OpenAPI documentation

repo: github/awesome-copilot

人気

GitHubのスター
40k
ランキング
#7067
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル