@@ -182,7 +182,7 @@ def app; SimpleApiWithHiddenDocumentation end
182
182
183
183
context "overriding hiding the documentation paths in prefixed API" do
184
184
before :all do
185
- class HideDocumentationPathMountedApi < Grape ::API
185
+ class HideDocumentationPathPrefixedMountedApi < Grape ::API
186
186
desc 'This gets something.'
187
187
get '/something' do
188
188
{ bla : 'something' }
@@ -191,16 +191,16 @@ class HideDocumentationPathMountedApi < Grape::API
191
191
192
192
class PrefixedApiWithHiddenDocumentation < Grape ::API
193
193
prefix "abc"
194
- mount HideDocumentationPathMountedApi
194
+ mount HideDocumentationPathPrefixedMountedApi
195
195
add_swagger_documentation :hide_documentation_path => true
196
196
end
197
197
198
198
end
199
199
200
200
def app ; PrefixedApiWithHiddenDocumentation end
201
201
202
- it "it doesn't show the documentation path on /abc/swagger_doc/abc .json" do
203
- get '/abc/swagger_doc/abc .json'
202
+ it "it doesn't show the documentation path on /abc/swagger_doc/something .json" do
203
+ get '/abc/swagger_doc/something .json'
204
204
205
205
JSON . parse ( last_response . body ) . should == {
206
206
"apiVersion" => "0.1" ,
@@ -241,8 +241,8 @@ class PrefixedAndVersionedApiWithHiddenDocumentation < Grape::API
241
241
242
242
def app ; PrefixedAndVersionedApiWithHiddenDocumentation end
243
243
244
- it "it doesn't show the documentation path on /abc/v1/swagger_doc/abc .json" do
245
- get '/abc/v20/swagger_doc/abc .json'
244
+ it "it doesn't show the documentation path on /abc/v1/swagger_doc/something .json" do
245
+ get '/abc/v20/swagger_doc/something .json'
246
246
247
247
JSON . parse ( last_response . body ) . should == {
248
248
"apiVersion" => "v20" ,
0 commit comments