I'm using [rswag](https://github.com/rswag/rswag) to test a rather common RubyOnRails [JSON Api](https://jsonapi.org/) application, but I can't figure out a rather common case where I upload a file to an endpoint.

The endpoint expects the usual `data` attribute in the request body with a `file` attribute containing the binary, and I cannot make rswag to generate a request with the correct parameters.

```
  path '/documents' do
    post 'Creates a document' do
      tags 'Documents'
      consumes 'multipart/form-data'
      produces 'application/vnd.api+json'

      parameter name: 'data',
                description: 'Whatever',
                attributes: {
                  schema: {
                    type: :object,
                    properties: {
                      file: { type: :binary },
                    },
                  },
                }

      response '201', 'success' do
        let(:data) do
          {
            attributes: {
              file: Rack::Test::UploadedFile.new($REALARGS),
            },
          }
        end

        schema "$ref": '#/definitions/post_document_responses/201'

        run_test! do |_example|
          # ACTUAL TEST
        end
      end
    end
  end

```

There are some other simpler parameters (Authorization for example) that are correctly generated, I'm then sure `rswag` is hooked correctly.
The request I'm seeing has no parameters, I can remove the `data` parameter and nothing changes. I've tried a million combinations, always the same result and I don't know what's going on.

The `params` the controller expects is `data[attributes][file]`.

Can anyone help me?