如何在招摇请求中发送标头

时间:2015-11-15 18:55:11

标签: ruby-on-rails swagger rails-api

我使用身份验证名称和密码来保护api但是如何从swagger

中发送标头中的参数

我的代码是

 Swagger::Docs::Generator::set_real_methods

    # start swagger actions
    swagger_controller :users, "Users"

    swagger_api :signup do
        summary "SignUp"
        param :form, :first_name, :string, :required, "First Name"
        param :form, :last_name, :string, :required, "Last Name"
        param :form, :phone_no, :string, :required, "Phone Number"
        param :form, :email, :string, :required, "Email"
        param :form, :address, :string, :optional, "Address"
        param :form, :password, :string, :required, "Password"
        param :form, :password_confirmation, :string, :required, "Confirm Password"
    end

如何自定义它以及随之发送标题参数

1 个答案:

答案 0 :(得分:0)

您应该设置.circle { width: 200px; height: 200px; background: #4679BD; } 而不是表单。