apiaryio / api-blueprint

API Blueprint
https://apiblueprint.org
MIT License
8.63k stars 2.14k forks source link

Request headers not rendered #410

Closed ir-fuel closed 5 years ago

ir-fuel commented 6 years ago

This is my code:

### Set/Update customer info [PUT /xxx/customer/{id}]
Update the personal info of the customer. None of the fields are mandatory. The fields not specified will not be overwritten in the database.

+ Parameters
    + id (string) - Id of the customer

+ Request

    + Headers

            Authentication: Bearer SomeTokenValue

    + Attributes (object)
        + email (string, optional) - email address of the customer
        + password (string, optional) - email address of the customer
        + firstName (string, optional) - first name
        + lastName (string, optional) - last name
        + phoneNumber (string, optional) - phone number
        + receiveOffers (number, optional) - 1 if the customer wants to receive offers, 0 otherwise

    + Body

            {
                "email":"example@domain.com",
                "firstName":"Jos",
                "lastName":"Bos",
                "phoneNumber":"+32488697059",
                "receiveOffers":1
            }

This is what the result looks like

screen shot 2017-12-11 at 15 25 37 screen shot 2017-12-11 at 15 25 47

Why is the request header not shown?

kylef commented 6 years ago

The request header is shown inside your code example (on line 7). If you don't want to view a code example you can switch to the default (Raw) to see the raw request information (headers and request body).

screen shot 2017-12-11 at 08 06 44

ir-fuel commented 6 years ago

But why is it separate from the parameters and the attributes? That makes no sense to me. You can also say that the request parameters are shown too inside the code example, but doesn't it make more sense to have all variables grouped together? Why put url parameters at the top, but http headers in another section?

kylef commented 5 years ago

The layout has been redesigned in our new rendered documentation, check out. https://blog.apiary.io/ApiaryUI for more information on how to enable it.

If you have any further feedback or bug reports that are specific to Apiary rendered documentation please reach out to Apiary support. This repository and issue tracker is tracking the API Blueprint specification.

Here's how the example will look now:

screenshot 2019-01-17 at 10 37 36