wordnik/swagger-spec — pull request #75 by gong023 (2014-06-26 01:32:56+00:00)
Title: Added swagger-assert

Hi all.

I developed library which enables you to assert keys in swagger document and API response.

For an example, I would like to use this following API.
Swagger, in its doc, says it returns an "id" scheme and "name" scheme in it's response.
However, this API only returns the "id" scheme.

```php
/**
* @SWG\Model(
* @SWG\Property(name="id", type="integer", required=true, description="user id"),
* @SWG\Property(name="name", type="string", required=true, description="user name")
* )
*/
$app->get('/plain', function () use ($app) {
$response = [
'id' => 0
];

return $app->json($response);
});
```

Shouldn't the "name" scheme be included in the response? or should it not?
If the reponse differs from the Swagger document, developers have no way of knowing which is right.

This is why I've developed this swagger-assert library.
When running the test, it asserts whether or not the API response is the same as the Swagger doc.

For more information, please see README
- https://github.com/gong023/swagger-assert

Sample projects are shown here
- https://github.com/gong023/swagger-assert-sandbox

If you like it, please add this library to swagger-spec.