残りのサービスの API-Decumentation を書いているときに、応答として返される可能性のあるすべての値をリストしたいという問題に遭遇しました。
以下の場合、列挙の可能な値を含むことができるのは「状態」フィールドであり、どの状態が存在するかを合計したかったのです。
私は apiblueprint でそれを行うための簡単で良い方法を見つけることができませんでした. デフォルトでセクションを折りたたんで表示し、追加情報が必要なときにセクションを展開する方法はありますか?
これが私が持っているサンプルコードです:
## Sample [/Sample?{id}]
Get all the information for the sample
+ Parameters
+ id = `0` (Integer, optional) ... The Id of the resource to get
+ Model (application/json)
+ Body
{
"name": "Name of the Resource",
"state": "deleted"
}
### Retrieve the sample data of the system [GET]
+ Response 200
[ProviderConfiguration][]
パラメータセクションには「値」のようなものが必要ですが、ボディ部分にはボディセクションの状態を記述する必要があります。
<collapsible>
+ state (EnumType) ... current state of the sample object
+ Values
+ `active`
+ `inactive`
+ `deleted`
</collapsible>