mcpField
O
openapi-specification-v3.2

openapi-specification-v3.2

github.com/hairyf開発26878 回インストール2 週間前に更新
リポジトリ

openapi-specification-v3.2 について

OpenAPI Specification 3.2 の作成、更新、検証を支援するエージェント向けリファレンススキルです。文書構造、スキーマ、参照解決、セキュリティ、仕様記述の指針を扱います。

主な機能

  1. 01OpenAPI 3.2 文書の作成
  2. 02スキーマと参照のガイド
  3. 03パラメーター、リクエスト、レスポンス
  4. 04セキュリティ方式の設定
  5. 05仕様記述のベストプラクティス

活用シーン

  1. 01OpenAPI 3.2 ファイルの作成や更新
  2. 02複数文書間の参照解決
  3. 03API 操作とスキーマの記述

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/hairyf/skills --skill openapi-specification-v3.2

インストール後、Claude Code で/openapi-specification-v3.2を入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

GENERATION.md
references/
advanced-security-filtering.md
core-data-types-and-formats.md
callbacks-and-webhooks.md
advanced-extensions.md
core-discriminator-and-xml.md
components-reuse.md
advanced-base-uri-and-resolution.md
core-encoding-object.md
best-practices-spec-authoring.md
core-example-object.md
core-path-templating.md
core-link-object.md
core-http-status-codes.md
core-openapi-object.md
core-fixed-patterned-fields.md
core-format-and-structure.md
core-header-object.md
core-info-metadata.md
core-media-types.md
core-reference-object.md
parameters.md
core-runtime-expressions.md
core-tags-and-external-docs.md
schema-composition-polymorphism.md
request-body-and-media-type.md
core-server.md
schema-and-components.md
paths-and-operations.md
responses.md

詳細

OpenAPI Specification 3.2

OpenAPI Specification 3.2.0 のエージェント向けリファレンスです。OpenAPI 記述(OAD)の編集、生成、検証に使用します。

使用する場面

  • OpenAPI 3.2 の YAML/JSON ドキュメントを作成または更新する場合
  • 複数のドキュメントで構成された OAD で、$ref、$self、相対 URI を解決する場合
  • パス、オペレーション、パラメーター(query/path/header/cookie/querystring)、リクエストボディ、レスポンスを記述する場合
  • スキーマオブジェクト(JSON Schema Draft 2020-12 dialect)、コンポーネント、参照を使用する場合
  • セキュリティスキーム(apiKey、http、mutualTLS、oauth2、openIdConnect)と要件を設定する場合
  • メディアタイプ、エンコーディング(form、multipart)、例(dataValue/serializedValue/externalValue)を扱う場合

主なリファレンス

トピック説明リファレンス
OpenAPI オブジェクトルートオブジェクト、openapi、$self、info、servers、paths、webhooks、components、security、tagscore-openapi-object
形式と構造JSON/YAML、大文字と小文字の区別、リッチテキスト、OAD の構造、解析、ベース URIcore-format-and-structure
固定フィールドとパターンフィールド固定フィールドとパターンフィールド、paths のキー、components のキー、拡張(x-)core-fixed-patterned-fields
Info とメタデータInfo オブジェクト、Contact オブジェクト、License オブジェクトcore-info-metadata
サーバーServer オブジェクト、Server Variable、URL テンプレートcore-server
パスとオペレーションPaths オブジェクト、Path Item、Operation オブジェクト、additionalOperations、クエリpaths-and-operations
パステンプレートパステンプレート、パラメーター、マッチング、ABNFcore-path-templating
パラメーターParameter オブジェクト、in(path/query/header/cookie/querystring)、style、schema と content の比較parameters
リクエストボディとメディアタイプRequest Body、Media Type オブジェクト、メディアタイプの順序、itemSchemarequest-body-and-media-type
Encoding オブジェクト名前/位置によるエンコード、contentType、style、explode、form、multipartcore-encoding-object
メディアタイプcontent のキー、メディアタイプの範囲、OpenAPI Media Type Registrycore-media-types
レスポンスResponses オブジェクト、Response オブジェクト、headers、content、linksresponses
HTTP ステータスコードレスポンスのキー、default、X を使った 1XX~5XX の範囲core-http-status-codes
スキーマとコンポーネントSchema オブジェクト(JSON Schema 2020-12)、Components、$ref の解決schema-and-components
Schema の JSON Schema キーワードJSON Schema 2020-12 のキーワードと Schema 内の OAS 拡張schema-json-schema-keywords
スキーマの合成とポリモーフィズムallOf、oneOf、anyOf、discriminatorschema-composition-polymorphism
データ型とフォーマットJSON Schema の型、format キーワード、OAS ダイアレクトcore-data-types-and-formats
Discriminator と XMLDiscriminator オブジェクト、XML オブジェクト(nodeType、name、namespace)core-discriminator-and-xml
コンポーネントの再利用$ref によるパラメーター、レスポンス、スキーマの再利用components-reuse
Reference オブジェクト$ref、summary/description のオーバーライド、解決ルールcore-reference-object
Header オブジェクトレスポンス/multipart のヘッダー、style simple、Set-Cookie、Linkcore-header-object
Example オブジェクトdataValue、serializedValue、value、externalValue、例の使用方法core-example-object
Tag と外部ドキュメントTag オブジェクト、External Documentation オブジェクト、parent、kindcore-tags-and-external-docs
Link オブジェクトoperationRef、operationId、parameters、requestBodycore-link-object
ランタイム式$request、$response、$url、$method、ABNF、Link/Callback での使用core-runtime-expressions
セキュリティSecurity Scheme、OAuth Flows、Security Requirement オブジェクトsecurity
Security Scheme の型apiKey、http(basic/bearer)、mutualTLS、oauth2、openIdConnectsecurity-scheme-types
Security Requirement オブジェクトOR/AND のセマンティクス、{} は任意、[] はクリア、スコープsecurity-requirement-object
OAuth2 フローOAuth Flows オブジェクト、OAuth Flow オブジェクト、authorizationCode、deviceAuthorizationsecurity-oauth2-flows
コールバックと WebhookCallback オブジェクト、webhookscallbacks-and-webhooks
拡張仕様の拡張(x-)、拡張レジストリadvanced-extensions

ベストプラクティス

トピック説明参照
仕様の作成operationId、tags、$self、components の再利用、レスポンス、セキュリティbest-practices-spec-authoring

詳細

トピック説明参照
ベース URI と解決$self、取得 URI、参照の解決、解析のガイダンスadvanced-base-uri-and-resolution
セキュリティフィルタリング空の Paths/Path Item、セキュリティに関する考慮事項advanced-security-filtering

要点

  • OAS 3.2 のルートでは openapi: 3.2.0 を使用します。components、paths、webhooks のうち、少なくとも 1 つが MUST です。
  • $self は参照解決のためにドキュメントのベース URI を指定します。複数ドキュメントの OAD で使用してください。
  • Schema Object は JSON Schema Draft 2020-12 のスーパーセットです。空のスキーマは true、なしは false です。
  • Parameter:schema+style または content(Media Type は 1 つ)のいずれかを使用します。in: "querystring" には content が必要です。
  • ルートの Security は OR(Security Requirement Object のいずれか)です。オペレーションごとに上書きでき、{} は任意を意味します。

コメント