Reputation: 11
I know this is a stupid question, but I need to help
I have project with API on grape.
In my routes.rb i mount API
mount API::Root => '/'
in api/api.rb
module API
class Root < Grape::API
prefix 'api'
default_format :json
add_swagger_documentation(
hide_documentation_path: true,
markdown: GrapeSwagger::Markdown::KramdownAdapter
)
mount Home::Users
end
end
end i have rout like this
POST /api/users/:id
What do I need to make that route was without a prefix 'api'
POST /users/:id
Upvotes: 0
Views: 1256
Reputation: 5491
Remove the prefix 'api'
line from api/api.rb and you should be all set.
Upvotes: 1