apiaryio / dredd-example

Example application using Dredd and CI
MIT License
85 stars 61 forks source link

Unclear how to specify example parameters, headers #2

Closed cmdrkeene closed 10 years ago

cmdrkeene commented 10 years ago

This tool would be great but I can't seem to specify parameters or headers to actual usage. The example is not much help in this regard.

In my test project I've defined a resource as follows:

## Like [/groups/{group_id}/messages/{message_id}/like]

### Like [POST]

+ Parameters 

    + group_id (required, string, `1`) ... id of the Group.
    + message_id (required, string, `2`) ... id of the Message.

+ Request

    + Headers

        X-Access-Token: token-ok

+ Response 200

When I run dredd I get some (misspelled) errors:

$ dredd v3.apib https://localhost:5000 --dry-run
INFO: Runtime compilation warning: 
Ambigous URI template: /groups/{group_id}/messages/{message_id}/like 
Parameter not defined:'group_id'
 on Message > Like > Like
INFO: Runtime compilation warning: 
Ambigous URI template: /groups/{group_id}/messages/{message_id}/like 
Parameter not defined:'message_id'

How does one define a parameter if not in the API Blueprint style?