-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Replace apivore with rswag for api tests #969
Conversation
11990c6
to
451ed07
Compare
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.
Ah, very very good to see this!
apivore was a big blocker for the Rails upgrade, and I think your approach is perfectly fine. Just too bad that we now have a generated file in the tree. Perhaps we'd best start with CI validating that the swagger file isn't out-of-date (either with timestamps, or by generating and detecting changes - probably the latter).
For my point of view, please continue in this direction :) 👍
this is fixed in newer rubocop-rspec versions. see: rubocop/rubocop-rspec#1177
thanks for your feedback! There's one thing left: Beside of that I think this rswag stuff seems to work! I know this is quite a lot to review, so I'd be happy for any ideas how we can merge this best. |
d12ce99
to
619fdbe
Compare
I've created follow-up issues for the bug in the financial_transaction controller (see todo in the spec file) and for generating the swagger.yml at build time in the Dockerfile. |
i haven't reviewed this, but i'm excited to try it out some time. i would much rather have a vue.js app running as my customised front end rather than making lot of changes to haml files and then having a nightmare upgrading when a new foodsoft version comes out. so, thank you. also, glad you are using swagger. i haven't used it in ruby, but i have used it in nodejs and java projects before. |
This PR replaces apivore with rswag.
It's still in an early stage, but I thought it would be good to share some thoughts and the progress, as it will be quite a big changeset...
/docs/swagger.v1.yml
to/swagger/v1/swagger.yml
RAILS_ENV=test rails rswag
, should this be added to the CI?ToDo's
config/routes.rb:1:1: C: Metrics/BlockLength: Block has too many lines. [212/210]
spec/support/api_helper.rb:8:9: C: RSpec/VariableName: Use snake_case for variable names.