Reputation: 755
I am trying to generate the documentation with grape-swagger.
On my gem file
gem 'grape-entity'
gem 'grape-swagger'
gem 'grape-swagger-entity'
gem 'grape-swagger-rails'
On my endpoint
require 'grape-swagger'
module MyModule
class Api < Grape::API
content_type :json, 'application/json'
default_format :json
format :json
mount V1::Root
add_swagger_documentation
end
end
When I am visiting http://localhost:3000/swagger_doc I am getting an error,
No route matches [GET] "/swagger_doc".
Also I don't see any doc generated.
Upvotes: 0
Views: 451
Reputation: 1603
add the prefix if you have mounted a place other than root.
for example /api/swagger_doc
Upvotes: 2