get 'customer' do
security [Token: []]
parameter name: :params, in: :body, schema: {
type: :object,
properties: {
search: { type: :string, example: Faker::Name.first_name }
}
}
let(:params) { { search: Faker::Name.first_name } }
by considering the above code, the params will be this :
<ActionController::Parameters {"{\"search\":\"test_name\"}"=>nil, "controller"=>"api/v1/admin/staffs", "action"=>"new", "staff"=>{}} permitted: false>
so the search and faker:name.first_name attach in params as key, but i want search become key and faker become value.