Skip to content

File upload with other parameters? #146

Open
@epugh

Description

@epugh

My https://github.com/o19s/quepid/blob/main/app/controllers/books/import_controller.rb#L21 takes two parameters for the file upload. I tried documenting like this:

    # @request_body Upload a file(multipart/form-data)
    #   [
    #     !Hash{
    #       book: Hash{
    #         force_create_users: Boolean,
    #         import_file: File
    #       }
    #     }
    #   ]

However I get weird rendering:

Image

However, if I follow the example from the PR by @saida:

@request_body Upload a file(multipart/form-data) [Hash{ file: File }]

Then it works.

How should I structure the file upload?

Also, I think we need docs on this in https://a-chacon.com/oas_core/ as well...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions