ruby-on-rails - 如何在规范中描述 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>"
解决方案
推荐阅读
- git - 设置自定义 git 配置文件位置
- linux - Makefile:108: *** 配方在第一个目标之前开始
- javascript - 如何在 Docusaurus 项目中使用 useState() 钩子和配置道具?
- asp.net-mvc - 如何使用 asp.net core 3 从 SelectList 中选择一个 Id?
- asp.net - 如何将 HTML 选定值传递给控制器
- javascript - 如何检查元素的直接文本内容?
- python - argv 的 ctypes 错误
- ios - SwiftUI:样式化 TabbarView
- python - 如何划分列表中的特定元素,然后将值平方?
- django - django项目上的Digital Ocean内部服务器错误