{"id":15463520,"url":"https://github.com/cored/xml_matchers","last_synced_at":"2025-10-04T08:42:25.236Z","repository":{"id":66523385,"uuid":"141060785","full_name":"cored/xml_matchers","owner":"cored","description":"Validate your XML API responses","archived":false,"fork":false,"pushed_at":"2018-07-17T23:32:02.000Z","size":17,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T14:34:56.892Z","etag":null,"topics":["matchers","rspec","rspec-matchers","xml"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cored.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-15T21:49:43.000Z","updated_at":"2019-04-03T13:01:34.000Z","dependencies_parsed_at":"2023-02-28T01:01:44.093Z","dependency_job_id":null,"html_url":"https://github.com/cored/xml_matchers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cored%2Fxml_matchers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cored%2Fxml_matchers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cored%2Fxml_matchers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cored%2Fxml_matchers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cored","download_url":"https://codeload.github.com/cored/xml_matchers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250228687,"owners_count":21395958,"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":["matchers","rspec","rspec-matchers","xml"],"created_at":"2024-10-02T00:21:41.898Z","updated_at":"2025-10-04T08:42:20.218Z","avatar_url":"https://github.com/cored.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XmlMatchers\n\nValidates XML against XSD (XML schemas)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngroup :test do\n  gem \"xml_matchers\"\nend\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install xml_matchers\n\n## Usage\n\nInspired by [json_matchers](https://github.com/thoughtbot/json_matchers)\n\nFirst configure it in your test suite's helper file:\n\n### Rspec\n\n`spec/spec_helper`\n\n```ruby\nrequire \"xml_matchers/rspec\"\n```\n\n## Declare\n\nDeclare your XML Schema wherever you see fit for your project structure:\n\neg.  `spec/support/xml/schemas/locations.xsd`\n\n## Validate\n\nValidate an XML response or an String against an XML schema with\n`match_xml_schema`:\n\n```ruby\ndescribe \"GET /locations\" do\n  let(:locations_xml_schema) do\n    File.read(\"#{File.pwd}/spec/support/xml/schemas/locations.xsd\")\n  end\n\n  it \"returns locations\" do\n    get locations_path, format: :xml\n\n    expect(response.status).to eq 200\n    expect(response.body).to match_xml_schema(locations_xml_schema)\n  end\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/xml_matchers. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the XmlMatchers project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/xml_matchers/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcored%2Fxml_matchers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcored%2Fxml_matchers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcored%2Fxml_matchers/lists"}