(no title)
davnola | 11 years ago
5 months in, we're happy with API Blueprint. We used to use Dredd for API validation but ran into to some limitations:
- Dredd does not perform any validation against the siren response beyond the first key level. For example, it does not validate if the class-name is user-events, or usr-events
- Dredd does not make any difference between Action parameters and Resource parameters. Then, an action POST to create user-events will have undesired url parameters. E.G: POST /user-events?take=0&skip=2 (The apib blueprint specs allows to make this difference: https://github.com/apiaryio/api-blueprint/blob/master/exampl...)
So one of our devs created a Ruby validator, https://github.com/nogates/vigia. See http://engineering.lonelyplanet.com/2014/11/18/vigia-integra... if you're interested.
netmilk|11 years ago
- Dredd does not perform any validation against the siren response beyond the first key level. For example, it does not validate if the class-name is user-events, or usr-events
This I can't confirm, presence of object keys is validated on any level.
- Dredd does not make any difference between Action parameters and Resource parameters. Then, an action POST to create user-events will have undesired url parameters. E.G: POST /user-events?take=0&skip=2
This is true, but it’s by design. In Dredd URI parameters are inherited from resource to action, but there is no way how to filter out unwanted parameters from resource under action section.
In this case I assume that `skip` and `take` parameters belong only to GET action (retrieving collection), so its imho a non-sense to discuss them on the resource level because they will be propagated to any action under that resource.
Thank you for very interesting feedback!