在Laravel Dingo API Blueprint Docs中创建多个@Request(Create multiple @Request in Laravel Dingo API Blueprint Docs)
似乎Lavarel Dingo API Blueprint文档允许创建多个请求示例。 在文档中有一个“标识符”,这使我相信你可以有多个例子......记录多个请求的语法是什么?
这适合单身:
@Request({"user_mongo_id": "1234567890", "title": "Book", "is_private": "1"}, identifier="Example 1")It seems that Lavarel Dingo API Blueprint documentation allows to create multiple requests examples. In the docs there is an "identifier", which leads me to believe that you can have multiple examples... What is the syntax to document multiple requests?
This works perfect for a single:
@Request({"user_mongo_id": "1234567890", "title": "Book", "is_private": "1"}, identifier="Example 1")最满意答案
神奇的是@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
The magic is on @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
更多推荐
发布评论