我在rails应用程序中使用swagger-docs,并将动作swagger_api定义如下:
swagger_api :create do
summary 'Create an account'
notes 'create-account'
param :body, :body, :JSON, :required, 'body'
response :unprocessable_entity
end
如何测试swagger_api块?
更多信息:swagger_api是模块的ClassMethods,其定义如下:
module ClassMethods
def swagger_api(action, params = {}, &block)
end