I am developing a rails api with grape and I am putting the functionality into a mountable engine.
In the engine routes I mount the API:
mount API => '/'
In the test_app I am mounting the engine:
mount XBackend::Engine => "/"
The specs are passing when they access the api endpoints.
These are the relevant routes listed by rake routes:
api_swagger GET /api/swagger(.:format) swagger#index
Routes for XBackend::Engine:
api / API
Despite all this I can't access the /api/swagger.
It throws me this exception:
Missing template layouts/swagger with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder]}. Searched in: * "/Users/boti/Rails/clients/projectlounge/encore_backend/spec/test_app/app/views" * "/Users/boti/Rails/clients/projectlounge/encore_backend/app/views" * "/Users/boti/.rvm/gems/ruby-2.1.1@encore_backend/gems/grape-swagger-ui-0.0.4/app/views" * "/Users/boti/.rvm/gems/ruby-2.1.1@encore_backend/gems/devise-3.3.0/app/views"