私が取り組んでいるプロジェクトでいくつかの Apiary ドキュメントを編集しており、API 呼び出しの 1 つへのパラメーターが日時文字列であることを示す必要があります。Apiary はこのパラメーターの書式設定を窒息させているように見えるので、Apiary でこのパラメーターを文書化するための提案されたアプローチはどうなるのだろうと思っています。
実証するために、Apiary から標準のデフォルト ドキュメントChoice
を取得し、次のように日時オブジェクトを取得するようにドキュメントを変更しました。
## Choice [/questions/{question_id}/choices/{choice_id}/{datetime}]
+ Parameters
+ question_id: 1 (required, number) - ID of the Question in form of an integer
+ choice_id: 1 (required, number) - ID of the Choice in form of an integer
+ datetime: 2015-05-05T12:30:00 (optional, date) - The date/time (ISO8601 format) associated with this choice
この最終結果は次のテキストです。
datetime
05-05T12:30:00 (optional, date) - The date/time (ISO8601 format) that all returned events should be greater than or equal to Example: 2015.
これは明らかに間違っています。例の値を書き留めても問題ありません。ダッシュ ( -
) は、ここで問題を引き起こしている特殊文字です。これを正しく行うための推奨されるアプローチは何ですか?