danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 481 forks source link

Resource signatures are a little messy when rendered #145

Closed aichholzer closed 9 years ago

aichholzer commented 9 years ago

Consider this extract:

# Group Pictures

## Pictures [/pictures/{pictureId}/{?size}]
### Create [POST]

+ Request (application/json)

    + Body

            {
            }

+ Response 200

### Read [GET]

+ Parameters
    + pictureId (required, string) ... ID of the picture being requested.
    + size = `medium` (optional, string) ... Size of the picture being requested.
        + Values
            + `large`
            + `medium`
            + `small`

The resource is defined only once for all methods sharing the same end-point. Newly, this is being rendered as (latest version of aglio and olio theme):

POST /v1/photos//
GET /v1/photos/{photoId}/{?size}

Since POST does not define any Parameters for the request, the two parameters are being removed from the URL, which is actually very nice as it keeps the document much cleaner, but I believe that, in this case, at least the last slash should be removed. Removing both would be even better.

danielgtaylor commented 9 years ago

@aichholzer thanks for discovering this bug. I'll work on fixing it for the next release! :+1:

aichholzer commented 9 years ago

@danielgtaylor most welcome and thank you for the awesome tool!

danielgtaylor commented 9 years ago

@aichholzer this should now be fixed in the latest release.

aichholzer commented 9 years ago

@danielgtaylor thank you. Works perfectly!