Please look following code (change from lib/example):
require 'grape'
require 'grape-entity'
require '../lib/grape-swagger'
module Entities
module Some
class Thing < Grape::Entity
expose :text, documentation: { type: 'string', desc: 'Content of something.' }
expose :name, documentation: { type: String, desc: 'Name of something.' }
end
end
end
class Api < Grape::API
format :json
add_swagger_documentation models: [Entities::Some::Thing]
end
I expect request /swagger_doc/thing.json, will return some useful information.But actually is return me Not Found.
I try to tun rspec with grape-swagger/spec/api_global_models_spec.rb, test passed. But I do not know why above code not works.
I search the issues, the feature created by @chebyte
Please look following code (change from
lib/example
):I expect request
/swagger_doc/thing.json
, will return some useful information.But actually is return meNot Found
.I try to tun rspec with
grape-swagger/spec/api_global_models_spec.rb
, test passed. But I do not know why above code not works.I search the issues, the feature created by @chebyte