Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does json_matchers adhere to the JSON schema spec #19

Open
anthonator opened this issue Oct 3, 2015 · 4 comments
Open

Does json_matchers adhere to the JSON schema spec #19

anthonator opened this issue Oct 3, 2015 · 4 comments
Assignees

Comments

@anthonator
Copy link

I recently asked this question on Stackoverflow.

Based on the discussion it was suggested that the parser I was using doesn't seem to be adhering to the spec. I tried an online schema validator and that seemed to be the case.

I was just curious if I'm doing something wrong to make this work with json_matchers or whether this gem doesn't work with this use case.

@anthonator
Copy link
Author

@seanpdoyle
Copy link
Collaborator

@anthonator thanks for filing this issue.

That stack overflow question seems to have all the JSON required to reproduce this issue. Could you share your ruby code?

@anthonator
Copy link
Author

describe "POST /users" do
  context 'with valid data' do
    let(:valid_data) { FactoryGirl.attributes_for(:user, :with_password) }

    before { post users_path, valid_data, headers }

    it { expect(response).to match_response_schema('user_schema') }
  end
end

@philsturgeon
Copy link

Since the guts of this gem have switched from json-schema to json_schema this question is probably moot? The validator is doing the work for validation, so if it was an issue it probably isn't anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants