在Laravel Dingo API Blueprint Docs中创建多个@Request(Create multiple @Request in Laravel Dingo API Bluepri

编程入门 行业动态 更新时间:2024-10-23 08:25:03
在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

更多推荐

本文发布于:2023-08-07 06:15:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1462640.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   Blueprint   API   Laravel   Dingo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!