zipmark/rspec_api_documentation

Putting route in get(param) doesn't work for api blueprint

Opened this issue · 0 comments

According to this issue: #416, I need to define a route, but using route causes some really bad API blueprint formatting (putting GET and PUT together in one section is really confusing).

The readme says:

If you don't use route, then param in get(param) should be an URL as states in the rest of this documentation.

So I tried:

get "/api/customers" do
  parameter :keyword, 'Filter search content', :example => 'John', :type => 'string'

  let(:keyword) { "John" }

  example_request "List All Customers" do
    expect(response_status).to eq(200)
  end
end

But all I get is this error: undefined method route_uri' for #<RSpec::Core::Example "List All Customers"> (NoMethodError)

I don't know if my code is wrong, the readme is wrong, or the gem doesn't work with the get(param) format. Documentation is scarce. Any ideas?