- Fix error message for string responses. #49
- Remove dependency on Rails. #47
- Configure default options for all matchers. #46
- Use
JSON.pretty_generate
to format error messages. #44
- Accept a JSON string along with a
response
.
- Update
json-schema
dependency to~> 2.6.0
. #37
- No longer default to
strict: true
.
- Rename the gem to
json_matchers
.
- No longer condone auto-loading RSpec. Add documentation around adding
require "json_matchers/rspec"
to consumers'spec/spec_helper.rb
- Rename module to
JsonMatchers
. This resolves clashing with gems likeoj
/oj_mimic_json
that take control of the standard library'sjson
module. As a result, the file to require is nowjson_matchers
, instead ofjson/matchers
.
- Pass options from matcher to
JSON::Validator
- Includes validation failure message in RSpec output
- Supports RSpec 2 syntax
failure_message_for_should
andfailure_message_for_should_not
- RSpec failure messages include both the body of the response, and the body of the JSON Schema file
- Remove
schema_for
in favor of using$ref
. To learn more about$ref
, check out Understanding JSON Schema Structuring
- Validate your Rails response JSON with
match_response_schema