我正在编辑我所在项目的一些Apiary文档,并需要标识其中一个API调用的参数为datetime字符串。由于Apiary似乎无法处理此参数的格式,因此我想知道在Apiary中记录此参数的建议方法。
为了演示,我使用了Apiary的标准默认文档,并修改了Choice
文档以接受一个datetime对象,如下所示:
## 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.
这显然是错误的,即使直接写入示例值也是如此。破折号(-
)是一个特殊字符,在这里会导致问题。应该采取什么样的推荐方法来解决这个问题?