{"id":13879997,"url":"https://github.com/lnikkila/rspec_json_schema_matcher","last_synced_at":"2025-07-16T16:30:37.328Z","repository":{"id":34773955,"uuid":"38756488","full_name":"lnikkila/rspec_json_schema_matcher","owner":"lnikkila","description":"Validate JSON in your specs using JSON schema.","archived":true,"fork":false,"pushed_at":"2015-07-15T10:13:28.000Z","size":123,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-11T11:20:40.378Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lnikkila.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-08T13:42:07.000Z","updated_at":"2023-01-28T21:18:45.000Z","dependencies_parsed_at":"2022-09-13T02:51:46.876Z","dependency_job_id":null,"html_url":"https://github.com/lnikkila/rspec_json_schema_matcher","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lnikkila/rspec_json_schema_matcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnikkila%2Frspec_json_schema_matcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnikkila%2Frspec_json_schema_matcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnikkila%2Frspec_json_schema_matcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnikkila%2Frspec_json_schema_matcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lnikkila","download_url":"https://codeload.github.com/lnikkila/rspec_json_schema_matcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnikkila%2Frspec_json_schema_matcher/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265524602,"owners_count":23782009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T08:02:42.804Z","updated_at":"2025-07-16T16:30:37.029Z","avatar_url":"https://github.com/lnikkila.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"RSpec JSON schema matcher\n=========================\n\n[![Build status][circleci-badge]][circleci]\n\nValidate JSON in your specs using [JSON schema](http://json-schema.org/):\n\n```ruby\nit \"returns a valid user resource\" do\n  expect(response.body).to match_schema \"user\"\nend\n```\n\nHandy for testing JSON-based web APIs!\n\n### Installation ###\n\nAdd this to your application's Gemfile:\n\n```ruby\ngroup :test do\n  gem \"rspec_json_schema_matcher\"\nend\n```\n\nThen install the gem:\n\n```sh-session\n$ bundle\n```\n\n### Usage ###\n\n\u003e You might want to read my [blog post](https://lnikki.la/articles/rails-api-integration-tests-3/).\n\nProvides a single RSpec matcher called `match_schema` that accepts a relative\npath to a JSON schema without the .json extension.\n\nThe matcher assumes that your schemas are stored in `./spec/support/schemas` or\nin its subdirectories.\n\nFor example, if you want to use `./spec/support/schemas/users/instance.json`,\nwrite `match_schema \"users/instance\"`.\n\n### Development ###\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run\n`rake rspec` to run the tests. You can also run `bin/console` for an interactive\nprompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To\nrelease a new version, update the version number in `version.rb`, and then run\n`bundle exec rake release`, which will create a git tag for the version, push\ngit commits and tags, and push the `.gem` file to\n[rubygems.org](https://rubygems.org).\n\n### Contributing ###\n\nBug reports and pull requests are welcome!\n\n### Licence ###\n\nThe gem is available as open source under the terms of the\n[ISC License](http://opensource.org/licenses/ISC).\n\n[circleci]: https://circleci.com/gh/lnikkila/rspec_json_schema_matcher\n[circleci-badge]: https://img.shields.io/circleci/project/lnikkila/rspec_json_schema_matcher.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnikkila%2Frspec_json_schema_matcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flnikkila%2Frspec_json_schema_matcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnikkila%2Frspec_json_schema_matcher/lists"}