zipmark/rspec_api_documentation — pull request #87 by claudiob (2013-09-02 01:34:24+00:00)
Title: Allow requests with extra_params and no parameters

Without this commit, the following request:

put '/concerts/1' do
example_request 'Update an existing concert', concert: {year: 2011} do
...
end
end

would receive **no** PUT body/params, rather than the specified `concert: {year: 2011}`.

The reason is that the function `params` was returning nil if `example.metadata[:parameters]` was undefined, and the only one to define `example.metadata[:parameters]` was to have previously called `parameter`.

In other words, requests were not allowed to have so-called "extra parameters" unless they had at least one "parameter" specified.

This commit removes this restrictions, allowing requests to specify all their parameters "inline".