Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
joelngwt opened this issue Nov 4, 2019 · 0 comments
Open

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

joelngwt opened this issue Nov 4, 2019 · 0 comments

Comments

@joelngwt
Copy link

joelngwt commented Nov 4, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant