Определить как массив - PullRequest
       22

Определить как массив

0 голосов
/ 26 апреля 2018

На пасеке это говорит объект в светлом цвете текста. enter image description here

Это не объект, это массив, и я определен как таковой. Я пробовал несколько способов заставить текст обновляться, как вы можете видеть из кода и изображения, но мне это не удалось. Я что-то упустил?

### 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.

1 Ответ

0 голосов
/ 27 апреля 2018

Примечание: я работаю на пасеке Oracle

В отображаемом интерфейсе также есть символ "0". Он находится в правильном положении той же строки, что и текст «Объект». Этот нулевой символ, к сожалению, отражает тот факт, что элемент является нулевым индексным элементом массива. И что тогда этот элемент является объектом (что правильно).

Это неудачно и легко пропустить. «Ноль» не так заметен, как должно быть.

...