这不是一个对象,它是一个数组,我这样定义。从代码和图像中可以看出,我已尝试了几种方法来更新文本,但我没有成功。我错过了什么吗?
### List Order Coupons [GET /{order_id}/coupons{?page, limit}]
There are no filter parameter specific to coupons.
+ Parameters
+ order_id (number, required)
The order id
+ Response 200 (application/json)
+ Body
[
{
"id": 1,
"coupon_id": 1,
"order_id": 115,
"code": "557D2DEA0CCAFA1",
"amount": "5.0000",
"type": 1,
"discount": "4.6600"
}
]
+ Attributes (OrderCouponsResponse)
....(我的定义)
## OrderCouponsResponse (array)
+ (object) - (Tried to re organize after array did not work.)
+ `id` (number) - Numeric ID of the coupon code.
+ `coupon_id` (number) - Numeric ID of the associated coupon.
+ `order_id` (number) - Numeric ID of the associated order.
+ `code` (number) - Coupon code, as a string.
+ `amount` (number) - Amount of the coupon code.
+ type (enum)
+ `per_item_discount`
+ per_total_discount
+ shipping_discount
+ shipping_discount
+ percentage_discount
+ discount (number, optional) - The discount to apply to an order, as either an amount or a percentage.
答案 0 :(得分:0)
注意:我为Apiary Oracle工作
渲染界面中还有一个“0”字符。它位于与“对象”文本相同的行的完整右侧位置。遗憾的是,该零字符表示该元素是数组的零索引第n个元素。那么元素就是一个对象(这是正确的)。
这是不幸的,容易错过。 “零”不应该是可见的,因为它应该是。