Swaggerのモデルアイテムに追加情報を追加しようとしています。ドキュメントには、GFM構文を説明フィールドで使用できると記載されていますが、これはすべての場所で機能していません。ここでスウェーガーモデルの説明でマークダウンを使用するにはどうすればよいですか?
は、問題の最小限のダミー例です。
swagger: '2.0'
info:
title: Example API
description: (1) This is the API description containing some *rich* **text**
version: "1.0.0"
paths:
/products:
get:
summary: Product Types
description: (2) This is the path description also containing some *rich* **text**
responses:
200:
description: (3) This is a response description also containing some *rich* **text**
schema:
type: array
items:
$ref: '#/definitions/Product'
definitions:
Product:
description: (4) This is a model description where *rich* **text** does not work
type: object
properties:
product_id:
type: string
description: (5) This is a field description where *rich* **text** does not work
schema object documentationは、私は(4)とマークされた場所でのMarkdownを使用することができるはずと言う超えるがありません場所について何か言いなさい(5)。
モデルセクションの2か所のいずれかにMarkdownを追加します。これをどのように機能させることができますか?
https://github.com/swagger-api/swagger-editor/issues/682:「JSONスキーマオブジェクトをレンダリングするには、[json-schema-view-js](https://github.com)を使用してください。/mohsen1/json-schema-view-js)Markdownをサポートしていないlib。Swagger Editorはこのlibの動作を変更することはできません。 – Helen
@Helenありがとう。それは私の正確な問題ですが、私よりもはるかに簡潔に尋ねました:)彼らは正しいか、あまり誤解を招かないようにドキュメントを実際に更新するべきです。 –
これはSwagger仕様のこの部分を完全に実装していない点でエディタには問題があります。スペックは仕様であり、それを実装するのはツール開発者次第です。 – Helen