Skip to content

Commit bb4be10

Browse files
author
Bill Leeper
committed
Make default schemes undefined to match Swagger Spec
* There is already code to handle the scenario where the scheme is provided as a parameter.
1 parent 49f93b3 commit bb4be10

7 files changed

+0
-15
lines changed

lib/grape-swagger/doc_methods.rb

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ def defaults
9090
{
9191
info: {},
9292
models: [],
93-
schemes: %w( https http ),
9493
api_version: 'v1',
9594
target_class: nil,
9695
mount_path: '/swagger_doc',

spec/support/api_swagger_v2_result.rb

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ class ApiError < Grape::Entity
7979
{"name"=>"thing2", "description"=>"Operations about thing2s"},
8080
{"name"=>"dummy", "description"=>"Operations about dummies"}
8181
],
82-
"schemes"=>["https", "http"],
8382
"paths"=>{
8483
"/v3/other_thing/{elements}"=>{
8584
"get"=>{

spec/swagger_v2/api_swagger_v2_response_spec.rb

-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def app
5555
{"name"=>"entity_response", "description"=>"Operations about entity_responses"},
5656
{"name"=>"nested_type", "description"=>"Operations about nested_types"}
5757
],
58-
"schemes"=>["https", "http"],
5958
"paths"=>{
6059
"/nested_type"=>{
6160
"get"=>{
@@ -104,7 +103,6 @@ def app
104103
{"name"=>"entity_response", "description"=>"Operations about entity_responses"},
105104
{"name"=>"nested_type", "description"=>"Operations about nested_types"}
106105
],
107-
"schemes"=>["https", "http"],
108106
"paths"=>{
109107
"/entity_response"=>{
110108
"get"=>{
@@ -150,7 +148,6 @@ def app
150148
{"name"=>"entity_response", "description"=>"Operations about entity_responses"},
151149
{"name"=>"nested_type", "description"=>"Operations about nested_types"}
152150
],
153-
"schemes"=>["https", "http"],
154151
"paths"=>{
155152
"/params_response"=>{
156153
"post"=>{

spec/swagger_v2/default_api_spec.rb

-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def app
2727
"produces"=>["application/json"],
2828
"host"=>"example.org",
2929
"tags" => [{"name"=>"something", "description"=>"Operations about somethings"}],
30-
"schemes" => ["https", "http"],
3130
"paths"=>{
3231
"/something"=>{
3332
"get"=>{
@@ -72,7 +71,6 @@ def app
7271
"produces"=>["application/json"],
7372
"host"=>"example.org",
7473
"tags" => [{"name"=>"something", "description"=>"Operations about somethings"}],
75-
"schemes" => ["https", "http"],
7674
"paths"=>{
7775
"/something"=>{
7876
"get"=>{

spec/swagger_v2/hide_api_spec.rb

-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def app
4141
"produces"=>["application/xml", "application/json", "application/octet-stream", "text/plain"],
4242
"host"=>"example.org",
4343
"tags" => [{"name"=>"simple", "description"=>"Operations about simples"}, {"name"=>"lazy", "description"=>"Operations about lazies"}],
44-
"schemes" => ["https", "http"],
4544
"paths"=>{
4645
"/simple"=>{
4746
"get"=>{
@@ -98,7 +97,6 @@ def app
9897
"produces"=>["application/xml", "application/json", "application/octet-stream", "text/plain"],
9998
"host"=>"example.org",
10099
"tags" => [{"name"=>"simple", "description"=>"Operations about simples"}],
101-
"schemes" => ["https", "http"],
102100
"paths"=>{
103101
"/simple/show"=>{
104102
"get"=>{
@@ -117,7 +115,6 @@ def app
117115
"produces"=>["application/xml", "application/json", "application/octet-stream", "text/plain"],
118116
"host"=>"example.org",
119117
"tags" => [{"name"=>"simple", "description"=>"Operations about simples"}],
120-
"schemes" => ["https", "http"],
121118
"paths"=>{
122119
"/simple/show"=>{
123120
"get"=>{

spec/swagger_v2/mounted_target_class_spec.rb

-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def app
3434
"produces"=>["application/xml", "application/json", "application/octet-stream", "text/plain"],
3535
"host"=>"example.org",
3636
"tags"=>[{"name"=>"simple", "description"=>"Operations about simples"}],
37-
"schemes"=>["https", "http"],
3837
"paths"=>{
3938
"/simple"=>{
4039
"get"=>{
@@ -57,7 +56,6 @@ def app
5756
"tags" => [{"name"=>"simple", "description"=>"Operations about simples"}],
5857
"produces"=>["application/xml", "application/json", "application/octet-stream", "text/plain"],
5958
"host"=>"example.org",
60-
"schemes" => ["https", "http"],
6159
"paths" => {
6260
"/simple"=>{
6361
"get"=>{

spec/swagger_v2/simple_mounted_api_spec.rb

-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ def app
7979
"produces"=>["application/xml", "application/json", "application/octet-stream", "text/plain"],
8080
"host"=>"example.org",
8181
"tags" => [{"name"=>"simple", "description"=>"Operations about simples"}, {"name"=>"simple-test", "description"=>"Operations about simple-tests"}, {"name"=>"simple_with_headers", "description"=>"Operations about simple_with_headers"}, {"name"=>"items", "description"=>"Operations about items"}, {"name"=>"custom", "description"=>"Operations about customs"}],
82-
"schemes"=>["https", "http"],
8382
"paths"=>{
8483
"/simple"=>{
8584
"get"=>{
@@ -155,7 +154,6 @@ def app
155154
"produces"=>["application/xml", "application/json", "application/octet-stream", "text/plain"],
156155
"host"=>"example.org",
157156
"tags" => [{"name"=>"simple", "description"=>"Operations about simples"}, {"name"=>"simple-test", "description"=>"Operations about simple-tests"}, {"name"=>"simple_with_headers", "description"=>"Operations about simple_with_headers"}, {"name"=>"items", "description"=>"Operations about items"}, {"name"=>"custom", "description"=>"Operations about customs"}],
158-
"schemes"=>["https", "http"],
159157
"paths"=>{
160158
"/simple"=>{
161159
"get"=>{
@@ -182,7 +180,6 @@ def app
182180
"produces"=>["application/xml", "application/json", "application/octet-stream", "text/plain"],
183181
"host"=>"example.org",
184182
"tags" => [{"name"=>"simple", "description"=>"Operations about simples"}, {"name"=>"simple-test", "description"=>"Operations about simple-tests"}, {"name"=>"simple_with_headers", "description"=>"Operations about simple_with_headers"}, {"name"=>"items", "description"=>"Operations about items"}, {"name"=>"custom", "description"=>"Operations about customs"}],
185-
"schemes"=>["https", "http"],
186183
"paths"=>{
187184
"/simple-test"=>{
188185
"get"=>{

0 commit comments

Comments
 (0)