active_model_serializers/test/support/schemas/custom/show.json
Mauro George 5058694f4a Create assert_response_schema test helper
It is a common pattern to use JSON Schema to validate a API response[1], [2]
and [3].

This patch creates the `assert_response_schema` test helper that helps people do
this kind of validation easily on the controller tests.

[1]: https://robots.thoughtbot.com/validating-json-schemas-with-an-rspec-matcher
[2]: https://github.com/sharethrough/json-schema-rspec
[3]: https://github.com/rails-api/active_model_serializers/issues/1011#issuecomment-127608121
2016-01-15 00:45:56 -06:00

8 lines
140 B
JSON

{
"id": "file://custom/show.json#",
"properties": {
"name" : { "type" : "string" },
"description" : { "type" : "string" }
}
}