Replace apivore with rswag for api tests (#969)

* Replace apivore api tests with rswag
* move to OpenAPI Spec 3.0.1
* a swagger UI is now reachable at http://localhost:3000/api-docs/index.html
*  swagger file is generated by running  `RAILS_ENV=test rails rswag`
    and it was moved from /docs/swagger.v1.yml to /swagger/v1/swagger.yml

---------

Co-authored-by: viehlieb <pf@pragma-shift.net>
This commit is contained in:
Philipp Rothmann 2023-05-12 11:11:48 +02:00 committed by GitHub
parent 8604e27fe9
commit c67e9b5be8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 1478 additions and 1858 deletions

View file

@ -1,4 +1,7 @@
# rubocop:disable Metrics/BlockLength
Rails.application.routes.draw do
mount Rswag::Ui::Engine => '/api-docs'
mount Rswag::Api::Engine => '/api-docs'
get "order_comments/new"
get "comments/new"
@ -290,3 +293,4 @@ Rails.application.routes.draw do
resources :users, only: [:index]
end # End of /:foodcoop scope
end
# rubocop:enable Metrics/BlockLength