私は、実際のJSONフィールド自体が何を表しているのかを記述したいと思います。Apiary:JSONレスポンスフィールドの内容を文書化できますか?
私はGETステートメントとパラメータを文書化しましたが、これはユーザーに与える完全なドキュメントを作成するものではありません。
したがって、以下の例では、「OtherFields」についてのコメントを追加する方法を示します。これはサポートされていますか?あるいは、私は別の場所で仲間の文書を作る必要がありますか?
## View Applications [/cat{?sort}{&order}{&page}]
### List all Applications
### Get List of Applications [GET]
+ Parameters
+ sort (optional, string) ... `sort` parameter is used to specify which criteria to use for sorting. One of the following strings may be used:
`"NAME",
"RATING", "QUALITY" ,
"RISKLEVEL", `
+ order (optional, string) ... `order` parameter is used to specify which order to use if sorting is used. One of the following strings may be used:
`"ASC",
"DESC"`
+ page (optional, int) ... `page` parameter is used to request subsequent catalog pages.
+ Response 200 (application/json)
{
"Catalog" : {
"Page" : 0,
"Count" : 6,
"Applications" : [{
"UID" : "6882e96a-5da1-11e3-1111-3f24f45df3ad"
"OtherFields: ""
}]
}}
ここで説明するように、オブジェクトの定義と配列はうまくいきません。私はApiaryとaglioで試しましたが、どちらも配列内のオブジェクトをレンダリングしません。 – Aichholzer
@AichholzerこれはApiaryとAglioの最新号です。https://github.com/apiaryio/api-blueprint/issues/191を参照してください。 – Zdenek