rswag/test-app/config
Gabriel Sobrinho f8dbd98bbc
Add a macro for complexes multiparts
This will allow to describe multipart in a short way, like JSON payload:

Before:

    put 'Creates a blog with thumbnail' do
      consumes 'multipart/form-data'
      parameter name: :title, in: :formData, type: :string, required: true
      parameter name: :content, in: :formData, type: :string, required: true
      parameter name: :file, in: :formData, type: :file, required: true

      let(:blog) { FactoryBot.build(:blog) }
      let(:title) { blog.title }
      let(:content) { blog.content }
      let(:file) { blog.file }

      ...
    end

After:

    put 'Creates a blog with thumbnail' do
      consumes 'multipart/form-data'
      parameter name: :blog, in: :formData, schema: { '$ref' => '#/definitions/blog' }

      let(:blog) { FactoryBot.attributes_for(:blog) }

      ...
    end

Your mileage may vary but you can always choose the best option.
2020-04-16 22:38:35 -03:00
..
environments Removed some deprecation warnings 2017-05-19 11:11:13 -07:00
initializers Remove deprecation warnings for Rails 5 and 6 2020-03-20 20:52:36 +00:00
application.rb Remove deprecation warnings for Rails 5 and 6 2020-03-20 20:52:36 +00:00
boot.rb Prep for 1.3.0 2017-06-26 17:39:34 -07:00
database.yml rename to rswag plus major refactor - almost a rewrite 2016-10-11 18:31:12 -07:00
environment.rb rename to rswag plus major refactor - almost a rewrite 2016-10-11 18:31:12 -07:00
routes.rb Add a macro for complexes multiparts 2020-04-16 22:38:35 -03:00