Infoオブジェクト
オブジェクトは API に関するメタデータを提供します。メタデータは、必要に応じてクライアントによって使用されてもよく、便宜上、編集またはドキュメント生成ツールで表示されてもよい(MAY)。
固定フィールド
| フィールド名 | タイプ | 説明 |
|---|---|---|
| タイトル | string | 必須。APIのタイトル。 |
| まとめ | string | API の短い概要。 |
| 説明 | string | API の説明。CommonMark 構文はリッチ テキスト表現に使用できます (MAY)。 |
| 利用規約 | string | API の利用規約への URL。これは URL の形式でなければなりません。 |
| コンタクト | Contactオブジェクト | 公開された API の連絡先情報。 |
| ライセンス | licenseオブジェクト | 公開された API のライセンス情報。 |
| バージョン | string | 必須。OpenAPI ドキュメントのバージョン ( OpenAPI 仕様バージョンまたは API 実装バージョンとは異なります)。 |
このオブジェクトは、仕様拡張機能を使用して拡張できます。
情報オブジェクトの例
{ "title": "Sample Pet Store App", "summary": "A pet store manager.", "description": "This is a sample server for a pet store.", "termsOfService": "https://example.com/terms/", "contact": { "name": "API Support", "url": "https://www.example.com/support", "email": "support@example.com" }, "license": { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0.1"}
title: Sample Pet Store Appsummary: A pet store manager.description: This is a sample server for a pet store.termsOfService: https://example.com/terms/contact: name: API Support url: https://www.example.com/support email: support@example.comlicense: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.htmlversion: 1.0.1