在Laravel Dingo API Blueprint Docs中创建多个@Request

时间:2016-04-19 15:09:15

标签: api laravel documentation dingo-api

似乎Lavarel Dingo API Blueprint文档允许创建多个请求示例。在文档中有一个“标识符”,这使我相信你可以有多个例子......记录多个请求的语法是什么?

这适用于单身:

 @Request({"user_mongo_id": "1234567890", "title": "Book", "is_private": "1"}, identifier="Example 1")

1 个答案:

答案 0 :(得分:0)

神奇的是@Transaction

 * @Transaction({
 *  @Request({"user_mongo_id": "1234567890", "title": "Book", "is_private": "1"}, identifier="Private Gallery"),
 *  @Request({"user_mongo_id": "123456789", "title": "Magazine", "is_private": "0"}, identifier="Public Gallery"),
 * })

https://github.com/dingo/api/wiki/API-Blueprint-Documentation#transaction