We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As of committee 4.4.0, assert_schema_conform requires HTTP status code explicitly. Ref. interagent/committee@9a388e5
assert_schema_conform
But schema_conformist calls assert_schema_conform without status code in https://github.com/kymmt90/schema_conformist/blob/master/lib/schema_conformist/process_with_assertion.rb#L10
I think that we need a discussion how to deal with newly introduced assert_schema_conform/1.
assert_schema_conform/1
@kymmt90 What do you think about this?
The text was updated successfully, but these errors were encountered:
Sorry for the late reply. These are my ideas:
:expected_status
super
1 is a straightforward but redundant solution. We have to set expected status code value for each request:
# ProcessWithAssertion def process(method, path, **kwargs) super(method, path, kwargs.except(:expected_status)) return if schema_conformist_ignored_path?(path) assert_schema_conform(kwargs[:expected_status]) end # in test test 'GET /products' do get products_url, as: :json, expected_status: 200 end
On the other hand, 2 is a solution which is a little bit inappropriate in the meaning of the "expected status code" but keeps current behavior:
# ProcessWithAssertion def process(method, path, **kwargs) status = super return if schema_conformist_ignored_path?(path) assert_schema_conform(status) end # in test test 'GET /products' do get products_url, as: :json end
Sorry, something went wrong.
No branches or pull requests
As of committee 4.4.0,
assert_schema_conform
requires HTTP status code explicitly.Ref. interagent/committee@9a388e5
But schema_conformist calls
assert_schema_conform
without status code in https://github.com/kymmt90/schema_conformist/blob/master/lib/schema_conformist/process_with_assertion.rb#L10I think that we need a discussion how to deal with newly introduced
assert_schema_conform/1
.@kymmt90 What do you think about this?
The text was updated successfully, but these errors were encountered: