-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Assert Schema #1677
Assert Schema #1677
Conversation
Is this a WIP? |
@@ -68,6 +85,10 @@ def response_body | |||
load_json(response.body) | |||
end | |||
|
|||
def request_params | |||
request.env['action_dispatch.request.request_parameters'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is defined in Rails. We want it to be only GET params or the POST (raw_params) depending on the request.method, I think. I don't think there's a scenario where they should be merged (as request.params does, IIRC)
@NullVoxPopuli yes, it's a WIP, though I am using it. the two other bullet points, on reflection , are really JSON API schema concerns, and I don't think they belong here i.e. JSON API making |
7e12bc2
to
b15a566
Compare
b15a566
to
1cc7e8e
Compare
c466dc9
to
3519479
Compare
updated with changelog |
conflicts :-( |
3519479
to
fbd3ab1
Compare
@NullVoxPopuli updated |
I've been using this locally for a few weeks now. no complaints |
@response = response | ||
@payload = payload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 53 should probably be changed, response_body
should be replaced with @payload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maksar PRs welcome.. you just commented on a PR that was closed four years ago
This works, but I'd like some discussionon the interface change, and then I'll
add some tests.
assert_request_schema
type
in create params (an exception allowed in the spec)assert_schema_schema
data
is present, but justmeta