I try to send a request using the put and post methods. It doesn't pars params, however everything is fine on the #get method.

user_spec.b :

 put '/api/v1/users/:id' do let!(:id) { user_second.id } parameter :email, "Email of user, have to be unique, cannot be blank", required: true, :scope => :user let!(:email) { 'test@test.test' } example_request "Update a specific user(valid)" do #expect(status).to eq(200) end end 

the log is:

  # --- Caused by: --- # JSON::ParserError: # 795: unexpected token at 'user[email]=test%40test.test' # /home/krava/.rvm/gems/ruby-2.2.4/gems/json-1.8.3/lib/json/common.rb:155:in `parse' 

Gemfile :

 gem 'rspec_api_documentation' gem 'rspec-rails', '~> 3.0' 
  • one
    And show the request code to the server. - Mal Skrylev
  • Maybe an error in JSON - Daniel-664
  • Apparently, this is a question more about rspec_api_documentation , there is a DSL for describing requests. I did not use this particular thing, but the riddle is somewhere there. - D-side

0