首页 > 解决方案 > 如何在规范中描述 rswagger 标头

问题描述

我需要发送一个文件。如何使用 rswagger 在 rspec 中声明内容处置?

response 422, 'invalid request' do
    header 'X-Rate-Limit-Limit', type: :integer, description: 'The number of allowed requests in the current period'

我想是这样的:

content-disposition: attachment; filename="<some file name>"

标签: ruby-on-railsrubyrspec

解决方案


推荐阅读