-
Notifications
You must be signed in to change notification settings - Fork 64
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
Hanami framework support #176
Comments
This gem is tested only with Rails framework now. According to git history, |
Thanks for the reply, I have previously created a similar issue #5 so I am familiar with the fact that the library is only tested with rails. I was using 0.8.1 before, but I guess the error is related to the actionpack version update, and essentially the problem is on their side. |
Hmm, so, IIUC, a quick fix is to declare |
I don't know why, but it didn't work. is it look correct? |
@AlexeyMatskevich oops. Gemfile needs the fix too |
Thanks, fixed that, but the result is the same GIT
remote: https://github.com/AlexeyMatskevich/rspec-openapi
revision: 9d12c4657ce5b5b8d414007e7e30f0317d6dc160
branch: AlexeyMatskevich-rails-dom-testing
specs:
rspec-openapi (0.12.0)
actionpack (>= 5.2.0)
rails-dom-testing
rspec-core Failure/Error: response.parsed_body
NameError:
uninitialized constant ActionDispatch::RequestEncoder::Rails
# /usr/local/bundle/gems/actionpack-7.1.3.2/lib/action_dispatch/testing/request_encoder.rb:55:in `block in <class:RequestEncoder>'
# /usr/local/bundle/gems/actionpack-7.1.3.2/lib/action_dispatch/testing/test_response.rb:50:in `parsed_body' |
Overall, I'm in no hurry as everything breaks on version 12, so I'm rolling back. All put requests, all 404 responses and more are gone. |
I've looked this using Roda without installing Rails gemfile.lock
|
I think here is the cause. rspec-openapi/lib/rspec/openapi/record_builder.rb Lines 92 to 102 in 05d6b5f
rspec-openapi converts request and response into If one wants to support Hanami in rspec-openapi, I think this part needs update. |
Closed by #202 |
After updating the dependencies, I noticed that the
parsed_body
rspec-openapi/lib/rspec/openapi/record_builder.rb
Lines 43 to 47 in 5469c81
action_dispatch/testing/request_encoder.rb
.https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/request_encoder.rb#L57
Since rspec-openapi depends on actionpack this leads to dependency on rails regardless of the rails-dom-testing installation.
My project uses Roda and Hanami and no rails.
The text was updated successfully, but these errors were encountered: