@@ -23,12 +23,12 @@ def app; subject end
23
23
24
24
it "retrieves the given base-path on /swagger_doc" do
25
25
get '/swagger_doc'
26
- last_response . body . should == "{:apiVersion=>\" 0.1\" , :swaggerVersion=>\" 1.1\" , :basePath=>\" #{ SimpleApiWithBasePath ::NON_DEFAULT_BASE_PATH } \" , :operations=>[], :apis=>[{:path=>\" /swagger_doc/mountedapi .{format}\" }, {:path=>\" /swagger_doc/swagger_doc.{format}\" }]}"
26
+ last_response . body . should == "{:apiVersion=>\" 0.1\" , :swaggerVersion=>\" 1.1\" , :basePath=>\" #{ SimpleApiWithBasePath ::NON_DEFAULT_BASE_PATH } \" , :operations=>[], :apis=>[{:path=>\" /swagger_doc/something .{format}\" }, {:path=>\" /swagger_doc/swagger_doc.{format}\" }]}"
27
27
end
28
28
29
29
it "retrieves the same given base-path for mounted-api" do
30
30
Random . stub ( :rand ) { 0 }
31
- get '/swagger_doc/mountedapi '
31
+ get '/swagger_doc/something '
32
32
last_response . body . should == "{:apiVersion=>\" 0.1\" , :swaggerVersion=>\" 1.1\" , :basePath=>\" #{ SimpleApiWithBasePath ::NON_DEFAULT_BASE_PATH } \" , :resourcePath=>\" \" , :apis=>[{:path=>\" /something.{format}\" , :operations=>[{:notes=>nil, :summary=>\" this gets something\" , :nickname=>0, :httpMethod=>\" GET\" , :parameters=>[]}]}]}"
33
33
end
34
34
end
@@ -46,12 +46,12 @@ def app; subject end
46
46
47
47
it "retrieves the given base-path on /swagger_doc" do
48
48
get '/swagger_doc'
49
- last_response . body . should == "{:apiVersion=>\" #{ SimpleApiWithAPiVersion ::API_VERSION } \" , :swaggerVersion=>\" 1.1\" , :basePath=>\" http://example.org\" , :operations=>[], :apis=>[{:path=>\" /swagger_doc/mountedapi .{format}\" }, {:path=>\" /swagger_doc/swagger_doc.{format}\" }]}"
49
+ last_response . body . should == "{:apiVersion=>\" #{ SimpleApiWithAPiVersion ::API_VERSION } \" , :swaggerVersion=>\" 1.1\" , :basePath=>\" http://example.org\" , :operations=>[], :apis=>[{:path=>\" /swagger_doc/something .{format}\" }, {:path=>\" /swagger_doc/swagger_doc.{format}\" }]}"
50
50
end
51
51
52
52
it "retrieves the same given base-path for mounted-api" do
53
53
Random . stub ( :rand ) { 0 }
54
- get '/swagger_doc/mountedapi '
54
+ get '/swagger_doc/something '
55
55
last_response . body . should == "{:apiVersion=>\" #{ SimpleApiWithAPiVersion ::API_VERSION } \" , :swaggerVersion=>\" 1.1\" , :basePath=>\" http://example.org\" , :resourcePath=>\" \" , :apis=>[{:path=>\" /something.{format}\" , :operations=>[{:notes=>nil, :summary=>\" this gets something\" , :nickname=>0, :httpMethod=>\" GET\" , :parameters=>[]}]}]}"
56
56
end
57
57
end
@@ -69,12 +69,12 @@ def app; subject end
69
69
70
70
it "retrieves the given base-path on /swagger_doc" do
71
71
get '/api_doc'
72
- last_response . body . should == "{:apiVersion=>\" 0.1\" , :swaggerVersion=>\" 1.1\" , :basePath=>\" http://example.org\" , :operations=>[], :apis=>[{:path=>\" /swagger_doc/mountedapi .{format}\" }, {:path=>\" /swagger_doc/swagger_doc.{format}\" }]}"
72
+ last_response . body . should == "{:apiVersion=>\" 0.1\" , :swaggerVersion=>\" 1.1\" , :basePath=>\" http://example.org\" , :operations=>[], :apis=>[{:path=>\" /swagger_doc/something .{format}\" }, {:path=>\" /swagger_doc/swagger_doc.{format}\" }]}"
73
73
end
74
74
75
75
it "retrieves the same given base-path for mounted-api" do
76
76
Random . stub ( :rand ) { 0 }
77
- get '/api_doc/mountedapi '
77
+ get '/api_doc/something '
78
78
last_response . body . should == "{:apiVersion=>\" 0.1\" , :swaggerVersion=>\" 1.1\" , :basePath=>\" http://example.org\" , :resourcePath=>\" \" , :apis=>[{:path=>\" /something.{format}\" , :operations=>[{:notes=>nil, :summary=>\" this gets something\" , :nickname=>0, :httpMethod=>\" GET\" , :parameters=>[]}]}]}"
79
79
end
80
80
@@ -85,4 +85,4 @@ def app; subject end
85
85
end
86
86
87
87
88
- end
88
+ end
0 commit comments