grape-swagger 1.1.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +14 -0
  3. data/.github/workflows/rubocop.yml +26 -0
  4. data/.github/workflows/ruby.yml +32 -0
  5. data/.rubocop.yml +65 -2
  6. data/.rubocop_todo.yml +1 -1
  7. data/CHANGELOG.md +50 -0
  8. data/Gemfile +8 -3
  9. data/README.md +182 -13
  10. data/UPGRADING.md +34 -0
  11. data/grape-swagger.gemspec +4 -4
  12. data/lib/grape-swagger.rb +7 -4
  13. data/lib/grape-swagger/doc_methods.rb +65 -62
  14. data/lib/grape-swagger/doc_methods/build_model_definition.rb +53 -2
  15. data/lib/grape-swagger/doc_methods/data_type.rb +4 -4
  16. data/lib/grape-swagger/doc_methods/format_data.rb +2 -2
  17. data/lib/grape-swagger/doc_methods/operation_id.rb +2 -2
  18. data/lib/grape-swagger/doc_methods/parse_params.rb +20 -4
  19. data/lib/grape-swagger/endpoint.rb +83 -32
  20. data/lib/grape-swagger/errors.rb +2 -0
  21. data/lib/grape-swagger/model_parsers.rb +2 -2
  22. data/lib/grape-swagger/rake/oapi_tasks.rb +2 -0
  23. data/lib/grape-swagger/version.rb +1 -1
  24. data/spec/issues/427_entity_as_string_spec.rb +1 -1
  25. data/spec/issues/430_entity_definitions_spec.rb +7 -5
  26. data/spec/issues/537_enum_values_spec.rb +1 -0
  27. data/spec/issues/776_multiple_presents_spec.rb +59 -0
  28. data/spec/issues/809_utf8_routes_spec.rb +55 -0
  29. data/spec/lib/data_type_spec.rb +12 -0
  30. data/spec/lib/format_data_spec.rb +24 -0
  31. data/spec/lib/move_params_spec.rb +2 -2
  32. data/spec/spec_helper.rb +1 -1
  33. data/spec/support/empty_model_parser.rb +3 -2
  34. data/spec/support/mock_parser.rb +1 -2
  35. data/spec/support/model_parsers/entity_parser.rb +8 -8
  36. data/spec/support/model_parsers/mock_parser.rb +24 -8
  37. data/spec/support/model_parsers/representable_parser.rb +8 -8
  38. data/spec/support/namespace_tags.rb +3 -0
  39. data/spec/swagger_v2/api_swagger_v2_hide_param_spec.rb +1 -1
  40. data/spec/swagger_v2/api_swagger_v2_mounted_spec.rb +1 -0
  41. data/spec/swagger_v2/api_swagger_v2_param_type_body_spec.rb +2 -2
  42. data/spec/swagger_v2/api_swagger_v2_response_with_headers_spec.rb +4 -2
  43. data/spec/swagger_v2/api_swagger_v2_response_with_models_spec.rb +53 -0
  44. data/spec/swagger_v2/api_swagger_v2_spec.rb +1 -0
  45. data/spec/swagger_v2/boolean_params_spec.rb +1 -0
  46. data/spec/swagger_v2/float_api_spec.rb +1 -0
  47. data/spec/swagger_v2/inheritance_and_discriminator_spec.rb +57 -0
  48. data/spec/swagger_v2/namespace_tags_prefix_spec.rb +1 -0
  49. data/spec/swagger_v2/param_multi_type_spec.rb +2 -0
  50. data/spec/swagger_v2/param_type_spec.rb +3 -0
  51. data/spec/swagger_v2/param_values_spec.rb +6 -0
  52. data/spec/swagger_v2/{params_array_collection_fromat_spec.rb → params_array_collection_format_spec.rb} +0 -0
  53. data/spec/swagger_v2/params_example_spec.rb +40 -0
  54. data/spec/swagger_v2/reference_entity_spec.rb +74 -29
  55. data/spec/swagger_v2/security_requirement_spec.rb +2 -2
  56. data/spec/swagger_v2/simple_mounted_api_spec.rb +3 -0
  57. metadata +27 -13
  58. data/.travis.yml +0 -35
@@ -3,7 +3,9 @@
3
3
  module GrapeSwagger
4
4
  module Errors
5
5
  class UnregisteredParser < StandardError; end
6
+
6
7
  class SwaggerSpec < StandardError; end
8
+
7
9
  class SwaggerSpecDeprecated < SwaggerSpec
8
10
  class << self
9
11
  def tell!(what)
@@ -16,14 +16,14 @@ module GrapeSwagger
16
16
  subhash = @parsers.except(klass).to_a
17
17
  insert_at = subhash.index(subhash.assoc(before_klass))
18
18
  insert_at = subhash.length - 1 if insert_at.nil?
19
- @parsers = Hash[subhash.insert(insert_at, [klass, ancestor])]
19
+ @parsers = subhash.insert(insert_at, [klass, ancestor]).to_h
20
20
  end
21
21
 
22
22
  def insert_after(after_klass, klass, ancestor)
23
23
  subhash = @parsers.except(klass).to_a
24
24
  insert_at = subhash.index(subhash.assoc(after_klass))
25
25
  insert_at = subhash.length - 1 if insert_at.nil?
26
- @parsers = Hash[subhash.insert(insert_at + 1, [klass, ancestor])]
26
+ @parsers = subhash.insert(insert_at + 1, [klass, ancestor]).to_h
27
27
  end
28
28
 
29
29
  def each
@@ -74,6 +74,7 @@ module GrapeSwagger
74
74
 
75
75
  # helper methods
76
76
  #
77
+ # rubocop:disable Style/StringConcatenation
77
78
  def make_request
78
79
  get url_for
79
80
 
@@ -83,6 +84,7 @@ module GrapeSwagger
83
84
  )
84
85
  ) + "\n"
85
86
  end
87
+ # rubocop:enable Style/StringConcatenation
86
88
 
87
89
  def url_for
88
90
  oapi_route = api_class.routes[-2]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GrapeSwagger
4
- VERSION = '1.1.0'
4
+ VERSION = '1.4.0'
5
5
  end
@@ -35,5 +35,5 @@ describe '#427 nested entity given as string' do
35
35
  JSON.parse(last_response.body)['definitions']
36
36
  end
37
37
 
38
- specify { expect(subject.keys).to include 'RoleEntity', 'Permission::WithoutRole' }
38
+ specify { expect(subject.keys).to include 'RoleEntity', 'Permission_WithoutRole' }
39
39
  end
@@ -55,6 +55,8 @@ describe 'definition names' do
55
55
  class Class7
56
56
  class SeventhEntity < Class6::SixthEntity
57
57
  expose :seventh_thing
58
+
59
+ private_class_method :entity_name
58
60
  end
59
61
  end
60
62
  end
@@ -82,11 +84,11 @@ describe 'definition names' do
82
84
  JSON.parse(last_response.body)['definitions']
83
85
  end
84
86
 
85
- specify { expect(subject).to include 'TestDefinition::DummyEntities::WithVeryLongName::AnotherGroupingModule::Class1' }
86
- specify { expect(subject).to include 'TestDefinition::DummyEntities::WithVeryLongName::AnotherGroupingModule::Class2' }
87
+ specify { expect(subject).to include 'TestDefinition_DummyEntities_WithVeryLongName_AnotherGroupingModule_Class1' }
88
+ specify { expect(subject).to include 'TestDefinition_DummyEntities_WithVeryLongName_AnotherGroupingModule_Class2' }
87
89
  specify { expect(subject).to include 'FooKlass' }
88
- specify { expect(subject).to include 'TestDefinition::DummyEntities::WithVeryLongName::AnotherGroupingModule::Class4::FourthEntity' }
89
- specify { expect(subject).to include 'TestDefinition::DummyEntities::WithVeryLongName::AnotherGroupingModule::Class5::FithEntity' }
90
+ specify { expect(subject).to include 'TestDefinition_DummyEntities_WithVeryLongName_AnotherGroupingModule_Class4_FourthEntity' }
91
+ specify { expect(subject).to include 'TestDefinition_DummyEntities_WithVeryLongName_AnotherGroupingModule_Class5_FithEntity' }
90
92
  specify { expect(subject).to include 'BarKlass' }
91
- specify { expect(subject).to include 'TestDefinition::DummyEntities::WithVeryLongName::AnotherGroupingModule::Class7::SeventhEntity' }
93
+ specify { expect(subject).to include 'TestDefinition_DummyEntities_WithVeryLongName_AnotherGroupingModule_Class7_SeventhEntity' }
92
94
  end
@@ -15,6 +15,7 @@ describe '#537 enum values spec' do
15
15
  desc 'create account',
16
16
  success: Spec
17
17
  get do
18
+ { message: 'hi' }
18
19
  end
19
20
  end
20
21
 
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe '#776 multiple presents spec' do
6
+ include_context "#{MODEL_PARSER} swagger example"
7
+
8
+ let(:app) do
9
+ Class.new(Grape::API) do
10
+ namespace :issue_776 do
11
+ desc 'Get multiple presents',
12
+ success: [
13
+ { model: Entities::EnumValues, as: :gender },
14
+ { model: Entities::Something, as: :somethings, is_array: true, required: true }
15
+ ]
16
+
17
+ get do
18
+ present :gender, { number: 1, gender: 'Male' }, with: Entities::EnumValues
19
+ present :somethings, [
20
+ { id: 1, text: 'element_1', links: %w[link1 link2] },
21
+ { id: 2, text: 'element_2', links: %w[link1 link2] }
22
+ ], with: Entities::Something, is_array: true
23
+ end
24
+ end
25
+
26
+ add_swagger_documentation format: :json
27
+ end
28
+ end
29
+
30
+ subject do
31
+ get '/swagger_doc'
32
+ JSON.parse(last_response.body)
33
+ end
34
+
35
+ let(:definitions) { subject['definitions'] }
36
+ let(:schema) { subject['paths']['/issue_776']['get']['responses']['200']['schema'] }
37
+
38
+ specify { expect(definitions.keys).to include 'EnumValues', 'Something' }
39
+
40
+ specify do
41
+ expect(schema).to eql({
42
+ 'properties' => {
43
+ 'somethings' => {
44
+ 'items' => {
45
+ '$ref' => '#/definitions/Something'
46
+ },
47
+ 'type' => 'array'
48
+ },
49
+ 'gender' => {
50
+ '$ref' => '#/definitions/EnumValues'
51
+ }
52
+ },
53
+ 'type' => 'object',
54
+ 'required' => [
55
+ 'somethings'
56
+ ]
57
+ })
58
+ end
59
+ end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe '#605 root route documentation' do
6
+ let(:app) do
7
+ Class.new(Grape::API) do
8
+ resource :grunnbeløp do
9
+ desc 'returnerer grunnbeløp'
10
+ get do
11
+ { message: 'hello world' }
12
+ end
13
+ end
14
+
15
+ resource :εσόδων do
16
+ desc 'εσόδων'
17
+ get do
18
+ { message: 'hello world' }
19
+ end
20
+ end
21
+
22
+ resource :数 do
23
+ desc '数'
24
+ get do
25
+ { message: 'hello world' }
26
+ end
27
+ end
28
+
29
+ resource :amount do
30
+ desc 'returns amount'
31
+ get do
32
+ { message: 'hello world' }
33
+ end
34
+ end
35
+
36
+ resource :👍 do
37
+ desc 'returns 👍'
38
+ get do
39
+ { message: 'hello world' }
40
+ end
41
+ end
42
+
43
+ add_swagger_documentation
44
+ end
45
+ end
46
+
47
+ subject do
48
+ get '/swagger_doc'
49
+ JSON.parse(last_response.body)['paths']
50
+ end
51
+
52
+ specify do
53
+ expect(subject.keys).to match_array ['/grunnbeløp', '/amount', '/εσόδων', '/数']
54
+ end
55
+ end
@@ -49,6 +49,18 @@ describe GrapeSwagger::DocMethods::DataType do
49
49
  it { is_expected.to eq 'MyInteger' }
50
50
  end
51
51
 
52
+ describe 'Types in array with inherited entity_name' do
53
+ before do
54
+ stub_const 'EntityBase', Class.new
55
+ allow(EntityBase).to receive(:entity_name).and_return 'MyInteger'
56
+ stub_const 'MyEntity', Class.new(EntityBase)
57
+ end
58
+
59
+ let(:value) { { type: '[MyEntity]' } }
60
+
61
+ it { is_expected.to eq 'MyInteger' }
62
+ end
63
+
52
64
  describe 'Rack::Multipart::UploadedFile' do
53
65
  let(:value) { { type: Rack::Multipart::UploadedFile } }
54
66
 
@@ -87,5 +87,29 @@ describe GrapeSwagger::DocMethods::FormatData do
87
87
  expect(subject.to_format(params)).to eq expected_params
88
88
  end
89
89
  end
90
+
91
+ context 'when array params are not related' do
92
+ let(:params) do
93
+ [
94
+ { name: 'id', required: true, type: 'string' },
95
+ { name: 'description', required: false, type: 'string' },
96
+ { name: 'ids[]', required: true, type: 'array', items: { type: 'string' } },
97
+ { name: 'user_ids[]', required: true, type: 'array', items: { type: 'string' } }
98
+ ]
99
+ end
100
+
101
+ let(:expected_params) do
102
+ [
103
+ { name: 'id', required: true, type: 'string' },
104
+ { name: 'description', required: false, type: 'string' },
105
+ { name: 'ids[]', required: true, type: 'array', items: { type: 'string' } },
106
+ { name: 'user_ids[]', required: true, type: 'array', items: { type: 'string' } }
107
+ ]
108
+ end
109
+
110
+ it 'parses params correctly and adds array type all concerned elements' do
111
+ expect(subject.to_format(params)).to eq expected_params
112
+ end
113
+ end
90
114
  end
91
115
  end
@@ -97,7 +97,7 @@ describe GrapeSwagger::DocMethods::MoveParams do
97
97
  let(:route_options) { { requirements: {} } }
98
98
  describe 'POST' do
99
99
  let(:params) { paths[path][:post][:parameters] }
100
- let(:route) { Grape::Router::Route.new('POST', path.dup, route_options) }
100
+ let(:route) { Grape::Router::Route.new('POST', path.dup, **route_options) }
101
101
 
102
102
  specify do
103
103
  subject.to_definition(path, params, route, definitions)
@@ -113,7 +113,7 @@ describe GrapeSwagger::DocMethods::MoveParams do
113
113
 
114
114
  describe 'POST' do
115
115
  let(:params) { paths['/in_body/{key}'][:put][:parameters] }
116
- let(:route) { Grape::Router::Route.new('PUT', path.dup, route_options) }
116
+ let(:route) { Grape::Router::Route.new('PUT', path.dup, **route_options) }
117
117
 
118
118
  specify do
119
119
  subject.to_definition(path, params, route, definitions)
data/spec/spec_helper.rb CHANGED
@@ -19,7 +19,7 @@ MODEL_PARSER = ENV.key?('MODEL_PARSER') ? ENV['MODEL_PARSER'].to_s.downcase.sub(
19
19
  require 'grape'
20
20
  require 'grape-swagger'
21
21
 
22
- Dir[File.join(Dir.getwd, 'spec/support/*.rb')].sort.each { |f| require f }
22
+ Dir[File.join(Dir.getwd, 'spec/support/*.rb')].each { |f| require f }
23
23
  require "grape-swagger/#{MODEL_PARSER}" if MODEL_PARSER != 'mock'
24
24
  require File.join(Dir.getwd, "spec/support/model_parsers/#{MODEL_PARSER}_parser.rb")
25
25
 
@@ -1,12 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # rubocop:disable Lint/EmptyClass
3
4
  class EmptyClass
4
5
  end
6
+ # rubocop:enable Lint/EmptyClass
5
7
 
6
8
  module GrapeSwagger
7
9
  class EmptyModelParser
8
- attr_reader :model
9
- attr_reader :endpoint
10
+ attr_reader :model, :endpoint
10
11
 
11
12
  def initialize(model, endpoint)
12
13
  @model = model
@@ -2,8 +2,7 @@
2
2
 
3
3
  module GrapeSwagger
4
4
  class MockParser
5
- attr_reader :model
6
- attr_reader :endpoint
5
+ attr_reader :model, :endpoint
7
6
 
8
7
  def initialize(model, endpoint)
9
8
  @model = model
@@ -145,23 +145,23 @@ RSpec.shared_context 'entity swagger example' do
145
145
 
146
146
  let(:swagger_nested_type) do
147
147
  {
148
- 'ApiError' => { 'type' => 'object', 'properties' => { 'code' => { 'type' => 'integer', 'format' => 'int32', 'description' => 'status code' }, 'message' => { 'type' => 'string', 'description' => 'error message' } }, 'description' => 'This returns something' },
148
+ 'ApiError' => { 'type' => 'object', 'properties' => { 'code' => { 'type' => 'integer', 'format' => 'int32', 'description' => 'status code' }, 'message' => { 'type' => 'string', 'description' => 'error message' } }, 'description' => 'ApiError model' },
149
149
  'ResponseItem' => { 'type' => 'object', 'properties' => { 'id' => { 'type' => 'integer', 'format' => 'int32' }, 'name' => { 'type' => 'string' } } },
150
- 'UseItemResponseAsType' => { 'type' => 'object', 'properties' => { 'description' => { 'type' => 'string' }, 'responses' => { '$ref' => '#/definitions/ResponseItem' } }, 'description' => 'This returns something' }
150
+ 'UseItemResponseAsType' => { 'type' => 'object', 'properties' => { 'description' => { 'type' => 'string' }, 'responses' => { '$ref' => '#/definitions/ResponseItem' } }, 'description' => 'UseItemResponseAsType model' }
151
151
  }
152
152
  end
153
153
 
154
154
  let(:swagger_entity_as_response_object) do
155
155
  {
156
- 'ApiError' => { 'type' => 'object', 'properties' => { 'code' => { 'type' => 'integer', 'format' => 'int32', 'description' => 'status code' }, 'message' => { 'type' => 'string', 'description' => 'error message' } }, 'description' => 'This returns something' },
156
+ 'ApiError' => { 'type' => 'object', 'properties' => { 'code' => { 'type' => 'integer', 'format' => 'int32', 'description' => 'status code' }, 'message' => { 'type' => 'string', 'description' => 'error message' } }, 'description' => 'ApiError model' },
157
157
  'ResponseItem' => { 'type' => 'object', 'properties' => { 'id' => { 'type' => 'integer', 'format' => 'int32' }, 'name' => { 'type' => 'string' } } },
158
- 'UseResponse' => { 'type' => 'object', 'properties' => { 'description' => { 'type' => 'string' }, '$responses' => { 'type' => 'array', 'items' => { '$ref' => '#/definitions/ResponseItem' } } }, 'description' => 'This returns something' }
158
+ 'UseResponse' => { 'type' => 'object', 'properties' => { 'description' => { 'type' => 'string' }, '$responses' => { 'type' => 'array', 'items' => { '$ref' => '#/definitions/ResponseItem' } } }, 'description' => 'UseResponse model' }
159
159
  }
160
160
  end
161
161
 
162
162
  let(:swagger_params_as_response_object) do
163
163
  {
164
- 'ApiError' => { 'type' => 'object', 'properties' => { 'code' => { 'description' => 'status code', 'type' => 'integer', 'format' => 'int32' }, 'message' => { 'description' => 'error message', 'type' => 'string' } }, 'description' => 'This returns something' }
164
+ 'ApiError' => { 'type' => 'object', 'properties' => { 'code' => { 'description' => 'status code', 'type' => 'integer', 'format' => 'int32' }, 'message' => { 'description' => 'error message', 'type' => 'string' } }, 'description' => 'ApiError model' }
165
165
  }
166
166
  end
167
167
 
@@ -300,7 +300,7 @@ RSpec.shared_context 'entity swagger example' do
300
300
  'type' => 'object',
301
301
  'required' => ['elements'],
302
302
  'properties' => { 'elements' => { 'type' => 'array', 'items' => { '$ref' => '#/definitions/QueryInputElement' }, 'description' => 'Set of configuration' } },
303
- 'description' => 'nested route inside namespace'
303
+ 'description' => 'QueryInput model'
304
304
  },
305
305
  'QueryInputElement' => {
306
306
  'type' => 'object',
@@ -310,7 +310,7 @@ RSpec.shared_context 'entity swagger example' do
310
310
  'ApiError' => {
311
311
  'type' => 'object',
312
312
  'properties' => { 'code' => { 'type' => 'integer', 'format' => 'int32', 'description' => 'status code' }, 'message' => { 'type' => 'string', 'description' => 'error message' } },
313
- 'description' => 'This gets Things.'
313
+ 'description' => 'ApiError model'
314
314
  },
315
315
  'Something' => {
316
316
  'type' => 'object',
@@ -320,7 +320,7 @@ RSpec.shared_context 'entity swagger example' do
320
320
  'links' => { 'type' => 'array', 'items' => { 'type' => 'link' } },
321
321
  'others' => { 'type' => 'text' }
322
322
  },
323
- 'description' => 'This gets Things.'
323
+ 'description' => 'Something model'
324
324
  }
325
325
  }
326
326
  }
@@ -40,21 +40,37 @@ RSpec.shared_context 'mock swagger example' do
40
40
  end
41
41
 
42
42
  class UseNestedWithAddress < OpenStruct; end
43
+
43
44
  class TypedDefinition < OpenStruct; end
45
+
44
46
  class UseItemResponseAsType < OpenStruct; end
47
+
45
48
  class OtherItem < OpenStruct; end
49
+
46
50
  class EnumValues < OpenStruct; end
51
+
47
52
  class AliasedThing < OpenStruct; end
53
+
48
54
  class FourthLevel < OpenStruct; end
55
+
49
56
  class ThirdLevel < OpenStruct; end
57
+
50
58
  class SecondLevel < OpenStruct; end
59
+
51
60
  class FirstLevel < OpenStruct; end
61
+
52
62
  class QueryInputElement < OpenStruct; end
63
+
53
64
  class QueryInput < OpenStruct; end
65
+
54
66
  class ApiError < OpenStruct; end
67
+
55
68
  class SecondApiError < OpenStruct; end
69
+
56
70
  class RecursiveModel < OpenStruct; end
71
+
57
72
  class DocumentedHashAndArrayModel < OpenStruct; end
73
+
58
74
  module NestedModule
59
75
  class ApiResponse < OpenStruct; end
60
76
  end
@@ -112,7 +128,7 @@ RSpec.shared_context 'mock swagger example' do
112
128
  'description' => "it's a mock"
113
129
  }
114
130
  },
115
- 'description' => 'This returns something'
131
+ 'description' => 'ApiError model'
116
132
  },
117
133
  'UseItemResponseAsType' => {
118
134
  'type' => 'object',
@@ -122,7 +138,7 @@ RSpec.shared_context 'mock swagger example' do
122
138
  'description' => "it's a mock"
123
139
  }
124
140
  },
125
- 'description' => 'This returns something'
141
+ 'description' => 'UseItemResponseAsType model'
126
142
  }
127
143
  }
128
144
  end
@@ -137,7 +153,7 @@ RSpec.shared_context 'mock swagger example' do
137
153
  'description' => "it's a mock"
138
154
  }
139
155
  },
140
- 'description' => 'This returns something'
156
+ 'description' => 'UseResponse model'
141
157
  },
142
158
  'ApiError' => {
143
159
  'type' => 'object',
@@ -147,7 +163,7 @@ RSpec.shared_context 'mock swagger example' do
147
163
  'description' => "it's a mock"
148
164
  }
149
165
  },
150
- 'description' => 'This returns something'
166
+ 'description' => 'ApiError model'
151
167
  }
152
168
  }
153
169
  end
@@ -162,7 +178,7 @@ RSpec.shared_context 'mock swagger example' do
162
178
  'description' => "it's a mock"
163
179
  }
164
180
  },
165
- 'description' => 'This returns something'
181
+ 'description' => 'ApiError model'
166
182
  }
167
183
  }
168
184
  end
@@ -296,7 +312,7 @@ RSpec.shared_context 'mock swagger example' do
296
312
  'description' => "it's a mock"
297
313
  }
298
314
  },
299
- 'description' => 'nested route inside namespace'
315
+ 'description' => 'QueryInput model'
300
316
  },
301
317
  'ApiError' => {
302
318
  'type' => 'object',
@@ -306,7 +322,7 @@ RSpec.shared_context 'mock swagger example' do
306
322
  'description' => "it's a mock"
307
323
  }
308
324
  },
309
- 'description' => 'This gets Things.'
325
+ 'description' => 'ApiError model'
310
326
  },
311
327
  'Something' => {
312
328
  'type' => 'object',
@@ -316,7 +332,7 @@ RSpec.shared_context 'mock swagger example' do
316
332
  'description' => "it's a mock"
317
333
  }
318
334
  },
319
- 'description' => 'This gets Things.'
335
+ 'description' => 'Something model'
320
336
  }
321
337
  }
322
338
  }