apipie-rails 0.9.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rubocop.yml +2 -2
  3. data/.rubocop.yml +23 -14
  4. data/.rubocop_todo.yml +103 -487
  5. data/CHANGELOG.md +20 -3
  6. data/README.rst +12 -12
  7. data/app/controllers/apipie/apipies_controller.rb +6 -6
  8. data/app/helpers/apipie_helper.rb +1 -1
  9. data/lib/apipie/apipie_module.rb +5 -5
  10. data/lib/apipie/application.rb +81 -55
  11. data/lib/apipie/configuration.rb +19 -26
  12. data/lib/apipie/dsl_definition.rb +8 -9
  13. data/lib/apipie/error_description.rb +1 -1
  14. data/lib/apipie/errors.rb +2 -16
  15. data/lib/apipie/extractor/collector.rb +3 -3
  16. data/lib/apipie/extractor/recorder.rb +1 -1
  17. data/lib/apipie/extractor.rb +2 -2
  18. data/lib/apipie/generator/config.rb +12 -0
  19. data/lib/apipie/generator/swagger/computed_interface_id.rb +23 -0
  20. data/lib/apipie/generator/swagger/config.rb +78 -0
  21. data/lib/apipie/generator/swagger/context.rb +12 -1
  22. data/lib/apipie/generator/swagger/method_description/api_decorator.rb +20 -0
  23. data/lib/apipie/generator/swagger/method_description/api_schema_service.rb +86 -0
  24. data/lib/apipie/generator/swagger/method_description/decorator.rb +22 -0
  25. data/lib/apipie/generator/swagger/method_description/parameters_service.rb +139 -0
  26. data/lib/apipie/generator/swagger/method_description/response_schema_service.rb +46 -0
  27. data/lib/apipie/generator/swagger/method_description/response_service.rb +58 -0
  28. data/lib/apipie/generator/swagger/method_description.rb +2 -0
  29. data/lib/apipie/generator/swagger/operation_id.rb +2 -2
  30. data/lib/apipie/generator/swagger/param_description/builder.rb +4 -4
  31. data/lib/apipie/generator/swagger/param_description/composite.rb +9 -1
  32. data/lib/apipie/generator/swagger/param_description/in.rb +1 -1
  33. data/lib/apipie/generator/swagger/param_description/path_params_composite.rb +61 -0
  34. data/lib/apipie/generator/swagger/param_description/referenced_composite.rb +36 -0
  35. data/lib/apipie/generator/swagger/param_description/type.rb +9 -2
  36. data/lib/apipie/generator/swagger/path_decorator.rb +36 -0
  37. data/lib/apipie/generator/swagger/referenced_definitions.rb +17 -0
  38. data/lib/apipie/generator/swagger/resource_description_collection.rb +30 -0
  39. data/lib/apipie/generator/swagger/resource_description_composite.rb +56 -0
  40. data/lib/apipie/generator/swagger/schema.rb +63 -0
  41. data/lib/apipie/generator/swagger/type_extractor.rb +0 -19
  42. data/lib/apipie/generator/swagger/warning.rb +3 -6
  43. data/lib/apipie/generator/swagger/warning_writer.rb +7 -1
  44. data/lib/apipie/helpers.rb +3 -3
  45. data/lib/apipie/method_description.rb +5 -3
  46. data/lib/apipie/param_description.rb +4 -2
  47. data/lib/apipie/resource_description.rb +11 -8
  48. data/lib/apipie/response_description.rb +1 -1
  49. data/lib/apipie/response_description_adapter.rb +3 -3
  50. data/lib/apipie/routing.rb +1 -1
  51. data/lib/apipie/rspec/response_validation_helper.rb +1 -1
  52. data/lib/apipie/swagger_generator.rb +27 -551
  53. data/lib/apipie/validator.rb +9 -5
  54. data/lib/apipie/version.rb +1 -1
  55. data/lib/apipie-rails.rb +17 -0
  56. data/lib/tasks/apipie.rake +25 -20
  57. data/spec/controllers/api/v2/nested/resources_controller_spec.rb +2 -2
  58. data/spec/controllers/pets_controller_spec.rb +10 -16
  59. data/spec/controllers/users_controller_spec.rb +2 -2
  60. data/spec/dummy/app/controllers/pets_controller.rb +4 -4
  61. data/spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb +2 -2
  62. data/spec/dummy/app/controllers/twitter_example_controller.rb +2 -2
  63. data/spec/dummy/app/controllers/users_controller.rb +5 -5
  64. data/spec/dummy/config.ru +1 -1
  65. data/spec/lib/apipie/apipies_controller_spec.rb +4 -0
  66. data/spec/lib/apipie/application_spec.rb +25 -15
  67. data/spec/lib/apipie/configuration_spec.rb +15 -0
  68. data/spec/lib/apipie/generator/swagger/config_spec.rb +19 -0
  69. data/spec/lib/apipie/generator/swagger/context_spec.rb +23 -2
  70. data/spec/lib/apipie/generator/swagger/method_description/api_schema_service_spec.rb +106 -0
  71. data/spec/lib/apipie/generator/swagger/method_description/response_schema_service_spec.rb +105 -0
  72. data/spec/lib/apipie/generator/swagger/param_description/builder_spec.rb +1 -1
  73. data/spec/lib/apipie/generator/swagger/param_description/composite_spec.rb +2 -2
  74. data/spec/lib/apipie/generator/swagger/param_description/type_spec.rb +7 -7
  75. data/spec/lib/apipie/generator/swagger/path_decorator_spec.rb +57 -0
  76. data/spec/lib/apipie/generator/swagger/referenced_definitions_spec.rb +35 -0
  77. data/spec/lib/apipie/generator/swagger/resource_description_composite_spec.rb +37 -0
  78. data/spec/lib/apipie/generator/swagger/resource_descriptions_collection_spec.rb +57 -0
  79. data/spec/lib/apipie/generator/swagger/schema_spec.rb +89 -0
  80. data/spec/lib/apipie/generator/swagger/type_extractor_spec.rb +0 -43
  81. data/spec/lib/apipie/generator/swagger/warning_spec.rb +1 -1
  82. data/spec/lib/apipie/generator/swagger/warning_writer_spec.rb +19 -7
  83. data/spec/lib/apipie/method_description_spec.rb +101 -66
  84. data/spec/lib/apipie/no_documented_method_spec.rb +17 -0
  85. data/spec/lib/apipie/param_description_spec.rb +209 -49
  86. data/spec/lib/apipie/param_group_spec.rb +1 -0
  87. data/spec/lib/apipie/resource_description_spec.rb +71 -28
  88. data/spec/lib/apipie/response_does_not_match_swagger_schema_spec.rb +35 -0
  89. data/spec/lib/apipie/swagger_generator_spec.rb +94 -0
  90. data/spec/lib/apipie/validator_spec.rb +47 -11
  91. data/spec/lib/rake_spec.rb +1 -1
  92. data/spec/lib/swagger/rake_swagger_spec.rb +6 -6
  93. data/spec/lib/swagger/swagger_dsl_spec.rb +17 -11
  94. data/spec/lib/validators/array_validator_spec.rb +1 -1
  95. data/spec/spec_helper.rb +2 -2
  96. metadata +31 -3
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config --exclude-limit 180`
3
- # on 2023-03-06 23:34:08 UTC using RuboCop version 1.48.0.
3
+ # on 2023-04-14 04:21:53 UTC using RuboCop version 1.44.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -17,6 +17,7 @@ Gemspec/DeprecatedAttributeAssignment:
17
17
  # Offense count: 9
18
18
  # Configuration parameters: EnforcedStyle, AllowedGems, Include.
19
19
  # SupportedStyles: Gemfile, gems.rb, gemspec
20
+ # AllowedGems: bundler
20
21
  # Include: **/*.gemspec, **/Gemfile, **/gems.rb
21
22
  Gemspec/DevelopmentDependencies:
22
23
  Exclude:
@@ -46,7 +47,7 @@ Gemspec/RequiredRubyVersion:
46
47
  Exclude:
47
48
  - 'spec/dummy/components/test_engine/test_engine.gemspec'
48
49
 
49
- # Offense count: 28
50
+ # Offense count: 24
50
51
  # This cop supports safe autocorrection (--autocorrect).
51
52
  # Configuration parameters: EnforcedStyle, IndentationWidth.
52
53
  # SupportedStyles: with_first_argument, with_fixed_indentation
@@ -59,13 +60,12 @@ Layout/ArgumentAlignment:
59
60
  - 'spec/dummy/app/controllers/twitter_example_controller.rb'
60
61
  - 'spec/lib/swagger/rake_swagger_spec.rb'
61
62
 
62
- # Offense count: 3
63
+ # Offense count: 2
63
64
  # This cop supports safe autocorrection (--autocorrect).
64
65
  # Configuration parameters: EnforcedStyleAlignWith.
65
66
  # SupportedStylesAlignWith: either, start_of_block, start_of_line
66
67
  Layout/BlockAlignment:
67
68
  Exclude:
68
- - 'lib/apipie/application.rb'
69
69
  - 'lib/apipie/extractor/writer.rb'
70
70
  - 'spec/lib/apipie/param_group_spec.rb'
71
71
 
@@ -79,12 +79,11 @@ Layout/CaseIndentation:
79
79
  - 'lib/apipie/extractor/writer.rb'
80
80
  - 'lib/apipie/helpers.rb'
81
81
 
82
- # Offense count: 3
82
+ # Offense count: 1
83
83
  # This cop supports safe autocorrection (--autocorrect).
84
84
  # Configuration parameters: AllowForAlignment.
85
85
  Layout/CommentIndentation:
86
86
  Exclude:
87
- - 'lib/apipie/swagger_generator.rb'
88
87
  - 'spec/dummy/app/controllers/pets_controller.rb'
89
88
 
90
89
  # Offense count: 1
@@ -95,7 +94,7 @@ Layout/DefEndAlignment:
95
94
  Exclude:
96
95
  - 'lib/apipie/generator/swagger/param_description/name.rb'
97
96
 
98
- # Offense count: 36
97
+ # Offense count: 27
99
98
  # This cop supports safe autocorrection (--autocorrect).
100
99
  # Configuration parameters: EnforcedStyle.
101
100
  # SupportedStyles: leading, trailing
@@ -105,7 +104,6 @@ Layout/DotPosition:
105
104
  - 'lib/apipie/generator/swagger/param_description/composite.rb'
106
105
  - 'lib/apipie/generator/swagger/param_description/type.rb'
107
106
  - 'lib/apipie/method_description.rb'
108
- - 'lib/apipie/swagger_generator.rb'
109
107
  - 'spec/lib/apipie/application_spec.rb'
110
108
  - 'spec/lib/apipie/generator/swagger/operation_id_spec.rb'
111
109
  - 'spec/lib/apipie/generator/swagger/param_description/type_spec.rb'
@@ -121,7 +119,7 @@ Layout/ElseAlignment:
121
119
  - 'lib/apipie/param_description.rb'
122
120
  - 'lib/apipie/resource_description.rb'
123
121
 
124
- # Offense count: 64
122
+ # Offense count: 60
125
123
  # This cop supports safe autocorrection (--autocorrect).
126
124
  Layout/EmptyLineAfterGuardClause:
127
125
  Exclude:
@@ -135,14 +133,13 @@ Layout/EmptyLineAfterGuardClause:
135
133
  - 'lib/apipie/param_description.rb'
136
134
  - 'lib/apipie/response_description_adapter.rb'
137
135
  - 'lib/apipie/see_description.rb'
138
- - 'lib/apipie/swagger_generator.rb'
139
136
  - 'lib/apipie/validator.rb'
140
137
  - 'lib/tasks/apipie.rake'
141
138
  - 'spec/dummy/config/initializers/apipie.rb'
142
139
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
143
140
  - 'spec/spec_helper.rb'
144
141
 
145
- # Offense count: 17
142
+ # Offense count: 13
146
143
  # This cop supports safe autocorrection (--autocorrect).
147
144
  # Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
148
145
  Layout/EmptyLineBetweenDefs:
@@ -153,13 +150,12 @@ Layout/EmptyLineBetweenDefs:
153
150
  - 'lib/apipie/extractor/writer.rb'
154
151
  - 'lib/apipie/response_description.rb'
155
152
  - 'lib/apipie/response_description_adapter.rb'
156
- - 'lib/apipie/swagger_generator.rb'
157
153
  - 'lib/apipie/validator.rb'
158
154
  - 'lib/tasks/apipie.rake'
159
155
  - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb'
160
156
  - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb'
161
157
 
162
- # Offense count: 74
158
+ # Offense count: 57
163
159
  # This cop supports safe autocorrection (--autocorrect).
164
160
  Layout/EmptyLines:
165
161
  Exclude:
@@ -170,18 +166,14 @@ Layout/EmptyLines:
170
166
  - 'lib/apipie/response_description.rb'
171
167
  - 'lib/apipie/response_description_adapter.rb'
172
168
  - 'lib/apipie/rspec/response_validation_helper.rb'
173
- - 'lib/apipie/swagger_generator.rb'
174
169
  - 'lib/apipie/validator.rb'
175
170
  - 'lib/tasks/apipie.rake'
176
171
  - 'spec/controllers/included_param_group_controller_spec.rb'
177
- - 'spec/controllers/pets_controller_spec.rb'
178
172
  - 'spec/dummy/app/controllers/pets_controller.rb'
179
173
  - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb'
180
174
  - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb'
181
175
  - 'spec/lib/apipie/apipies_controller_spec.rb'
182
176
  - 'spec/lib/apipie/application_spec.rb'
183
- - 'spec/lib/apipie/method_description_spec.rb'
184
- - 'spec/lib/apipie/param_description_spec.rb'
185
177
  - 'spec/lib/swagger/rake_swagger_spec.rb'
186
178
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
187
179
 
@@ -201,7 +193,7 @@ Layout/EmptyLinesAroundAttributeAccessor:
201
193
  Exclude:
202
194
  - 'lib/apipie/configuration.rb'
203
195
 
204
- # Offense count: 109
196
+ # Offense count: 93
205
197
  # This cop supports safe autocorrection (--autocorrect).
206
198
  # Configuration parameters: EnforcedStyle.
207
199
  # SupportedStyles: empty_lines, no_empty_lines
@@ -224,10 +216,8 @@ Layout/EmptyLinesAroundBlockBody:
224
216
  - 'spec/lib/apipie/file_handler_spec.rb'
225
217
  - 'spec/lib/apipie/generator/swagger/param_description/composite_spec.rb'
226
218
  - 'spec/lib/apipie/generator/swagger/param_description/type_spec.rb'
227
- - 'spec/lib/apipie/method_description_spec.rb'
228
219
  - 'spec/lib/apipie/param_description_spec.rb'
229
220
  - 'spec/lib/apipie/param_group_spec.rb'
230
- - 'spec/lib/apipie/resource_description_spec.rb'
231
221
  - 'spec/lib/apipie/validator_spec.rb'
232
222
  - 'spec/lib/rake_spec.rb'
233
223
  - 'spec/lib/swagger/rake_swagger_spec.rb'
@@ -236,14 +226,13 @@ Layout/EmptyLinesAroundBlockBody:
236
226
  - 'spec/spec_helper.rb'
237
227
  - 'spec/test_engine/memes_controller_spec.rb'
238
228
 
239
- # Offense count: 46
229
+ # Offense count: 44
240
230
  # This cop supports safe autocorrection (--autocorrect).
241
231
  # Configuration parameters: EnforcedStyle.
242
232
  # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
243
233
  Layout/EmptyLinesAroundClassBody:
244
234
  Exclude:
245
235
  - 'lib/apipie/application.rb'
246
- - 'lib/apipie/configuration.rb'
247
236
  - 'lib/apipie/error_description.rb'
248
237
  - 'lib/apipie/extractor.rb'
249
238
  - 'lib/apipie/extractor/collector.rb'
@@ -254,7 +243,6 @@ Layout/EmptyLinesAroundClassBody:
254
243
  - 'lib/apipie/response_description.rb'
255
244
  - 'lib/apipie/response_description_adapter.rb'
256
245
  - 'lib/apipie/see_description.rb'
257
- - 'lib/apipie/swagger_generator.rb'
258
246
  - 'lib/apipie/tag_list_description.rb'
259
247
  - 'lib/apipie/validator.rb'
260
248
  - 'spec/dummy/app/controllers/application_controller.rb'
@@ -267,26 +255,18 @@ Layout/EmptyLinesAroundClassBody:
267
255
  - 'spec/dummy/app/controllers/users_controller.rb'
268
256
  - 'spec/dummy/config/initializers/apipie.rb'
269
257
 
270
- # Offense count: 1
271
- # This cop supports safe autocorrection (--autocorrect).
272
- Layout/EmptyLinesAroundExceptionHandlingKeywords:
273
- Exclude:
274
- - 'lib/apipie/swagger_generator.rb'
275
-
276
- # Offense count: 11
258
+ # Offense count: 6
277
259
  # This cop supports safe autocorrection (--autocorrect).
278
260
  Layout/EmptyLinesAroundMethodBody:
279
261
  Exclude:
280
262
  - 'lib/apipie/application.rb'
281
263
  - 'lib/apipie/dsl_definition.rb'
282
264
  - 'lib/apipie/param_description.rb'
283
- - 'lib/apipie/resource_description.rb'
284
265
  - 'lib/apipie/response_description.rb'
285
266
  - 'lib/apipie/rspec/response_validation_helper.rb'
286
267
  - 'lib/apipie/static_dispatcher.rb'
287
- - 'lib/apipie/swagger_generator.rb'
288
268
 
289
- # Offense count: 33
269
+ # Offense count: 29
290
270
  # This cop supports safe autocorrection (--autocorrect).
291
271
  # Configuration parameters: EnforcedStyle.
292
272
  # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
@@ -299,14 +279,12 @@ Layout/EmptyLinesAroundModuleBody:
299
279
  - 'lib/apipie/errors.rb'
300
280
  - 'lib/apipie/extractor.rb'
301
281
  - 'lib/apipie/markup.rb'
302
- - 'lib/apipie/method_description.rb'
303
282
  - 'lib/apipie/param_description.rb'
304
283
  - 'lib/apipie/resource_description.rb'
305
284
  - 'lib/apipie/response_description.rb'
306
285
  - 'lib/apipie/response_description_adapter.rb'
307
286
  - 'lib/apipie/see_description.rb'
308
287
  - 'lib/apipie/static_dispatcher.rb'
309
- - 'lib/apipie/swagger_generator.rb'
310
288
  - 'lib/apipie/tag_list_description.rb'
311
289
  - 'lib/apipie/validator.rb'
312
290
 
@@ -324,12 +302,11 @@ Layout/EndAlignment:
324
302
  - 'lib/apipie/param_description.rb'
325
303
  - 'lib/apipie/resource_description.rb'
326
304
 
327
- # Offense count: 29
305
+ # Offense count: 28
328
306
  # This cop supports safe autocorrection (--autocorrect).
329
307
  # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
330
308
  Layout/ExtraSpacing:
331
309
  Exclude:
332
- - 'lib/apipie/configuration.rb'
333
310
  - 'lib/apipie/dsl_definition.rb'
334
311
  - 'spec/controllers/users_controller_spec.rb'
335
312
  - 'spec/dummy/app/controllers/pets_controller.rb'
@@ -348,7 +325,7 @@ Layout/FirstArrayElementIndentation:
348
325
  - 'spec/dummy/app/controllers/pets_controller.rb'
349
326
  - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb'
350
327
 
351
- # Offense count: 45
328
+ # Offense count: 38
352
329
  # This cop supports safe autocorrection (--autocorrect).
353
330
  # Configuration parameters: EnforcedStyle, IndentationWidth.
354
331
  # SupportedStyles: special_inside_parentheses, consistent, align_braces
@@ -358,7 +335,6 @@ Layout/FirstHashElementIndentation:
358
335
  - 'lib/apipie/extractor.rb'
359
336
  - 'lib/apipie/response_description.rb'
360
337
  - 'lib/apipie/response_description_adapter.rb'
361
- - 'lib/apipie/swagger_generator.rb'
362
338
  - 'spec/dummy/app/controllers/pets_controller.rb'
363
339
  - 'spec/lib/apipie/extractor/writer_spec.rb'
364
340
  - 'spec/lib/apipie/generator/swagger/operation_id_spec.rb'
@@ -369,7 +345,7 @@ Layout/FirstHashElementIndentation:
369
345
  - 'spec/lib/apipie/generator/swagger/param_description/type_spec.rb'
370
346
  - 'spec/lib/apipie/method_description/apis_service_spec.rb'
371
347
 
372
- # Offense count: 123
348
+ # Offense count: 122
373
349
  # This cop supports safe autocorrection (--autocorrect).
374
350
  # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
375
351
  # SupportedHashRocketStyles: key, separator, table
@@ -378,7 +354,6 @@ Layout/FirstHashElementIndentation:
378
354
  Layout/HashAlignment:
379
355
  Exclude:
380
356
  - 'lib/apipie/dsl_definition.rb'
381
- - 'lib/apipie/swagger_generator.rb'
382
357
  - 'lib/tasks/apipie.rake'
383
358
  - 'spec/controllers/users_controller_spec.rb'
384
359
  - 'spec/lib/apipie/extractor/writer_spec.rb'
@@ -401,7 +376,7 @@ Layout/IndentationConsistency:
401
376
 
402
377
  # Offense count: 10
403
378
  # This cop supports safe autocorrection (--autocorrect).
404
- # Configuration parameters: Width, AllowedPatterns.
379
+ # Configuration parameters: Width, AllowedPatterns, IgnoredPatterns.
405
380
  Layout/IndentationWidth:
406
381
  Exclude:
407
382
  - 'app/controllers/apipie/apipies_controller.rb'
@@ -421,12 +396,11 @@ Layout/InitialIndentation:
421
396
  - 'spec/dummy/app/controllers/extending_concern.rb'
422
397
  - 'spec/dummy/app/controllers/sample_controller.rb'
423
398
 
424
- # Offense count: 16
399
+ # Offense count: 15
425
400
  # This cop supports safe autocorrection (--autocorrect).
426
401
  # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
427
402
  Layout/LeadingCommentSpace:
428
403
  Exclude:
429
- - 'lib/apipie/configuration.rb'
430
404
  - 'lib/apipie/dsl_definition.rb'
431
405
  - 'lib/tasks/apipie.rake'
432
406
 
@@ -456,7 +430,7 @@ Layout/MultilineMethodCallBraceLayout:
456
430
  Exclude:
457
431
  - 'lib/tasks/apipie.rake'
458
432
 
459
- # Offense count: 22
433
+ # Offense count: 14
460
434
  # This cop supports safe autocorrection (--autocorrect).
461
435
  # Configuration parameters: EnforcedStyle, IndentationWidth.
462
436
  # SupportedStyles: aligned, indented, indented_relative_to_receiver
@@ -465,7 +439,6 @@ Layout/MultilineMethodCallIndentation:
465
439
  - 'lib/apipie/generator/swagger/param_description/builder.rb'
466
440
  - 'lib/apipie/generator/swagger/param_description/composite.rb'
467
441
  - 'lib/apipie/generator/swagger/param_description/type.rb'
468
- - 'lib/apipie/swagger_generator.rb'
469
442
 
470
443
  # Offense count: 5
471
444
  # This cop supports safe autocorrection (--autocorrect).
@@ -484,7 +457,7 @@ Layout/SpaceAfterColon:
484
457
  Exclude:
485
458
  - 'spec/dummy/app/controllers/included_param_group_controller.rb'
486
459
 
487
- # Offense count: 80
460
+ # Offense count: 42
488
461
  # This cop supports safe autocorrection (--autocorrect).
489
462
  Layout/SpaceAfterComma:
490
463
  Exclude:
@@ -499,12 +472,9 @@ Layout/SpaceAfterComma:
499
472
  - 'lib/apipie/method_description.rb'
500
473
  - 'lib/apipie/param_description.rb'
501
474
  - 'lib/apipie/static_dispatcher.rb'
502
- - 'lib/apipie/swagger_generator.rb'
503
475
  - 'lib/tasks/apipie.rake'
504
476
  - 'spec/controllers/users_controller_spec.rb'
505
477
  - 'spec/dummy/app/controllers/pets_controller.rb'
506
- - 'spec/dummy/app/controllers/twitter_example_controller.rb'
507
- - 'spec/dummy/app/controllers/users_controller.rb'
508
478
  - 'spec/dummy/config/initializers/apipie.rb'
509
479
  - 'spec/lib/apipie/apipies_controller_spec.rb'
510
480
  - 'spec/lib/apipie/application_spec.rb'
@@ -521,33 +491,6 @@ Layout/SpaceAfterNot:
521
491
  - 'lib/apipie/extractor/collector.rb'
522
492
  - 'lib/apipie/extractor/writer.rb'
523
493
 
524
- # Offense count: 35
525
- # This cop supports safe autocorrection (--autocorrect).
526
- # Configuration parameters: EnforcedStyle.
527
- # SupportedStyles: space, no_space
528
- Layout/SpaceAroundEqualsInParameterDefault:
529
- Exclude:
530
- - 'app/helpers/apipie_helper.rb'
531
- - 'lib/apipie/apipie_module.rb'
532
- - 'lib/apipie/application.rb'
533
- - 'lib/apipie/dsl_definition.rb'
534
- - 'lib/apipie/error_description.rb'
535
- - 'lib/apipie/method_description.rb'
536
- - 'lib/apipie/response_description.rb'
537
- - 'lib/apipie/response_description_adapter.rb'
538
- - 'lib/apipie/rspec/response_validation_helper.rb'
539
- - 'lib/apipie/swagger_generator.rb'
540
- - 'lib/apipie/validator.rb'
541
- - 'lib/tasks/apipie.rake'
542
- - 'spec/lib/swagger/swagger_dsl_spec.rb'
543
- - 'spec/spec_helper.rb'
544
-
545
- # Offense count: 1
546
- # This cop supports safe autocorrection (--autocorrect).
547
- Layout/SpaceAroundMethodCallOperator:
548
- Exclude:
549
- - 'lib/apipie/validator.rb'
550
-
551
494
  # Offense count: 142
552
495
  # This cop supports safe autocorrection (--autocorrect).
553
496
  # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
@@ -565,7 +508,7 @@ Layout/SpaceAroundOperators:
565
508
  - 'spec/lib/swagger/rake_swagger_spec.rb'
566
509
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
567
510
 
568
- # Offense count: 34
511
+ # Offense count: 32
569
512
  # This cop supports safe autocorrection (--autocorrect).
570
513
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
571
514
  # SupportedStyles: space, no_space
@@ -578,7 +521,6 @@ Layout/SpaceBeforeBlockBraces:
578
521
  - 'lib/apipie/param_description.rb'
579
522
  - 'lib/apipie/response_description.rb'
580
523
  - 'lib/apipie/routes_formatter.rb'
581
- - 'lib/apipie/swagger_generator.rb'
582
524
  - 'lib/tasks/apipie.rake'
583
525
  - 'spec/controllers/users_controller_spec.rb'
584
526
  - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb'
@@ -601,7 +543,7 @@ Layout/SpaceInsideArrayLiteralBrackets:
601
543
  - 'lib/apipie/generator/swagger/param_description/composite.rb'
602
544
  - 'spec/controllers/users_controller_spec.rb'
603
545
 
604
- # Offense count: 81
546
+ # Offense count: 63
605
547
  # This cop supports safe autocorrection (--autocorrect).
606
548
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
607
549
  # SupportedStyles: space, no_space
@@ -613,7 +555,6 @@ Layout/SpaceInsideBlockBraces:
613
555
  - 'lib/apipie/param_description.rb'
614
556
  - 'lib/apipie/response_description.rb'
615
557
  - 'lib/apipie/routes_formatter.rb'
616
- - 'lib/apipie/swagger_generator.rb'
617
558
  - 'lib/apipie/validator.rb'
618
559
  - 'lib/tasks/apipie.rake'
619
560
  - 'spec/controllers/users_controller_spec.rb'
@@ -626,20 +567,18 @@ Layout/SpaceInsideBlockBraces:
626
567
  - 'spec/spec_helper.rb'
627
568
  - 'spec/support/rake.rb'
628
569
 
629
- # Offense count: 222
570
+ # Offense count: 206
630
571
  # This cop supports safe autocorrection (--autocorrect).
631
572
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
632
573
  # SupportedStyles: space, no_space, compact
633
574
  # SupportedStylesForEmptyBraces: space, no_space
634
575
  Layout/SpaceInsideHashLiteralBraces:
635
576
  Exclude:
636
- - 'lib/apipie/dsl_definition.rb'
637
577
  - 'lib/apipie/extractor.rb'
638
578
  - 'lib/apipie/extractor/collector.rb'
639
579
  - 'lib/apipie/extractor/recorder.rb'
640
580
  - 'lib/apipie/response_description.rb'
641
581
  - 'lib/apipie/see_description.rb'
642
- - 'lib/apipie/swagger_generator.rb'
643
582
  - 'lib/tasks/apipie.rake'
644
583
  - 'spec/controllers/users_controller_spec.rb'
645
584
  - 'spec/dummy/app/controllers/pets_controller.rb'
@@ -648,7 +587,6 @@ Layout/SpaceInsideHashLiteralBraces:
648
587
  - 'spec/dummy/components/test_engine/app/controllers/test_engine/memes_controller.rb'
649
588
  - 'spec/lib/apipie/apipies_controller_spec.rb'
650
589
  - 'spec/lib/apipie/extractor/recorder/middleware_spec.rb'
651
- - 'spec/lib/apipie/method_description_spec.rb'
652
590
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
653
591
 
654
592
  # Offense count: 5
@@ -695,7 +633,7 @@ Layout/TrailingWhitespace:
695
633
  - 'spec/dummy/app/controllers/twitter_example_controller.rb'
696
634
 
697
635
  # Offense count: 10
698
- # This cop supports unsafe autocorrection (--autocorrect-all).
636
+ # This cop supports safe autocorrection (--autocorrect).
699
637
  # Configuration parameters: AllowSafeAssignment.
700
638
  Lint/AssignmentInCondition:
701
639
  Exclude:
@@ -738,13 +676,6 @@ Lint/IdentityComparison:
738
676
  Exclude:
739
677
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
740
678
 
741
- # Offense count: 5
742
- Lint/MissingSuper:
743
- Exclude:
744
- - 'lib/apipie/errors.rb'
745
- - 'lib/apipie/response_description_adapter.rb'
746
- - 'lib/apipie/validator.rb'
747
-
748
679
  # Offense count: 11
749
680
  # This cop supports unsafe autocorrection (--autocorrect-all).
750
681
  Lint/NonAtomicFileOperation:
@@ -793,14 +724,14 @@ Lint/ToJSON:
793
724
  - 'lib/apipie/validator.rb'
794
725
  - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb'
795
726
 
796
- # Offense count: 3
727
+ # Offense count: 2
797
728
  # Configuration parameters: AllowKeywordBlockArguments.
798
729
  Lint/UnderscorePrefixedVariableName:
799
730
  Exclude:
800
731
  - 'lib/apipie/application.rb'
801
732
  - 'lib/apipie/dsl_definition.rb'
802
733
 
803
- # Offense count: 29
734
+ # Offense count: 26
804
735
  # This cop supports safe autocorrection (--autocorrect).
805
736
  # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
806
737
  Lint/UnusedBlockArgument:
@@ -811,7 +742,6 @@ Lint/UnusedBlockArgument:
811
742
  - 'lib/apipie/param_description.rb'
812
743
  - 'lib/apipie/resource_description.rb'
813
744
  - 'lib/apipie/rspec/response_validation_helper.rb'
814
- - 'lib/apipie/swagger_generator.rb'
815
745
  - 'lib/tasks/apipie.rake'
816
746
  - 'spec/controllers/users_controller_spec.rb'
817
747
  - 'spec/lib/apipie/apipies_controller_spec.rb'
@@ -819,7 +749,7 @@ Lint/UnusedBlockArgument:
819
749
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
820
750
  - 'spec/spec_helper.rb'
821
751
 
822
- # Offense count: 28
752
+ # Offense count: 26
823
753
  # This cop supports safe autocorrection (--autocorrect).
824
754
  # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
825
755
  Lint/UnusedMethodArgument:
@@ -827,7 +757,6 @@ Lint/UnusedMethodArgument:
827
757
  - 'lib/apipie/application.rb'
828
758
  - 'lib/apipie/dsl_definition.rb'
829
759
  - 'lib/apipie/response_description_adapter.rb'
830
- - 'lib/apipie/swagger_generator.rb'
831
760
  - 'lib/apipie/validator.rb'
832
761
  - 'spec/dummy/config/initializers/apipie.rb'
833
762
  - 'spec/support/custom_bool_validator.rb'
@@ -852,10 +781,10 @@ Lint/Void:
852
781
  Exclude:
853
782
  - 'spec/controllers/users_controller_spec.rb'
854
783
 
855
- # Offense count: 57
856
- # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
784
+ # Offense count: 58
785
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
857
786
  Metrics/AbcSize:
858
- Max: 90
787
+ Max: 96
859
788
 
860
789
  # Offense count: 4
861
790
  # Configuration parameters: CountBlocks.
@@ -863,12 +792,12 @@ Metrics/BlockNesting:
863
792
  Max: 4
864
793
 
865
794
  # Offense count: 25
866
- # Configuration parameters: AllowedMethods, AllowedPatterns.
795
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
867
796
  Metrics/CyclomaticComplexity:
868
797
  Max: 24
869
798
 
870
- # Offense count: 71
871
- # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
799
+ # Offense count: 77
800
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
872
801
  Metrics/MethodLength:
873
802
  Max: 58
874
803
 
@@ -877,14 +806,14 @@ Metrics/MethodLength:
877
806
  Metrics/ModuleLength:
878
807
  Max: 119
879
808
 
880
- # Offense count: 5
809
+ # Offense count: 4
881
810
  # Configuration parameters: CountKeywordArgs.
882
811
  Metrics/ParameterLists:
883
812
  MaxOptionalParameters: 5
884
813
  Max: 6
885
814
 
886
- # Offense count: 23
887
- # Configuration parameters: AllowedMethods, AllowedPatterns.
815
+ # Offense count: 21
816
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
888
817
  Metrics/PerceivedComplexity:
889
818
  Max: 25
890
819
 
@@ -911,22 +840,21 @@ Naming/HeredocDelimiterCase:
911
840
  Exclude:
912
841
  - 'spec/dummy/app/controllers/users_controller.rb'
913
842
 
914
- # Offense count: 7
843
+ # Offense count: 6
915
844
  # Configuration parameters: ForbiddenDelimiters.
916
- # ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
845
+ # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
917
846
  Naming/HeredocDelimiterNaming:
918
847
  Exclude:
919
848
  - 'spec/dummy/app/controllers/twitter_example_controller.rb'
920
849
  - 'spec/dummy/app/controllers/users_controller.rb'
921
850
 
922
- # Offense count: 4
851
+ # Offense count: 3
923
852
  # Configuration parameters: EnforcedStyleForLeadingUnderscores.
924
853
  # SupportedStylesForLeadingUnderscores: disallowed, required, optional
925
854
  Naming/MemoizedInstanceVariableName:
926
855
  Exclude:
927
856
  - 'lib/apipie/apipie_module.rb'
928
857
  - 'lib/apipie/generator/swagger/param_description/type.rb'
929
- - 'lib/apipie/generator/swagger/type_extractor.rb'
930
858
 
931
859
  # Offense count: 3
932
860
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
@@ -952,7 +880,7 @@ Naming/PredicateName:
952
880
  # Offense count: 1
953
881
  # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
954
882
  # SupportedStyles: snake_case, normalcase, non_integer
955
- # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
883
+ # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
956
884
  Naming/VariableNumber:
957
885
  Exclude:
958
886
  - 'spec/dummy/app/controllers/users_controller.rb'
@@ -998,29 +926,21 @@ Performance/RedundantMerge:
998
926
  - 'lib/apipie/generator/swagger/param_description/type.rb'
999
927
  - 'lib/apipie/middleware/checksum_in_headers.rb'
1000
928
 
1001
- # Offense count: 8
929
+ # Offense count: 7
1002
930
  # This cop supports safe autocorrection (--autocorrect).
1003
931
  Performance/RegexpMatch:
1004
932
  Exclude:
1005
- - 'app/controllers/apipie/apipies_controller.rb'
1006
933
  - 'lib/apipie/extractor/writer.rb'
1007
934
  - 'lib/apipie/helpers.rb'
1008
935
 
1009
- # Offense count: 8
936
+ # Offense count: 7
1010
937
  # This cop supports safe autocorrection (--autocorrect).
1011
938
  Performance/StringIdentifierArgument:
1012
939
  Exclude:
1013
940
  - 'lib/apipie/extractor/writer.rb'
1014
941
  - 'spec/controllers/users_controller_spec.rb'
1015
- - 'spec/lib/apipie/method_description_spec.rb'
1016
-
1017
- # Offense count: 2
1018
- # This cop supports unsafe autocorrection (--autocorrect-all).
1019
- Performance/StringInclude:
1020
- Exclude:
1021
- - 'app/controllers/apipie/apipies_controller.rb'
1022
942
 
1023
- # Offense count: 7
943
+ # Offense count: 6
1024
944
  # This cop supports safe autocorrection (--autocorrect).
1025
945
  Performance/StringReplacement:
1026
946
  Exclude:
@@ -1029,7 +949,6 @@ Performance/StringReplacement:
1029
949
  - 'lib/apipie/extractor/writer.rb'
1030
950
  - 'lib/apipie/generator/swagger/operation_id.rb'
1031
951
  - 'lib/apipie/static_dispatcher.rb'
1032
- - 'lib/apipie/swagger_generator.rb'
1033
952
  - 'lib/tasks/apipie.rake'
1034
953
 
1035
954
  # Offense count: 2
@@ -1045,7 +964,7 @@ RSpec/Be:
1045
964
  - 'spec/controllers/concerns_controller_spec.rb'
1046
965
  - 'spec/controllers/users_controller_spec.rb'
1047
966
 
1048
- # Offense count: 56
967
+ # Offense count: 59
1049
968
  # This cop supports unsafe autocorrection (--autocorrect-all).
1050
969
  RSpec/BeEq:
1051
970
  Exclude:
@@ -1057,7 +976,6 @@ RSpec/BeEq:
1057
976
  - 'spec/lib/apipie/method_description_spec.rb'
1058
977
  - 'spec/lib/apipie/param_description_spec.rb'
1059
978
  - 'spec/lib/apipie/param_group_spec.rb'
1060
- - 'spec/lib/apipie/resource_description_spec.rb'
1061
979
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
1062
980
  - 'spec/lib/validators/array_validator_spec.rb'
1063
981
 
@@ -1066,7 +984,7 @@ RSpec/BeforeAfterAll:
1066
984
  Exclude:
1067
985
  - 'spec/controllers/users_controller_spec.rb'
1068
986
 
1069
- # Offense count: 55
987
+ # Offense count: 52
1070
988
  # Configuration parameters: Prefixes, AllowedPatterns.
1071
989
  # Prefixes: when, with, without
1072
990
  RSpec/ContextWording:
@@ -1094,7 +1012,7 @@ RSpec/DescribeClass:
1094
1012
  - 'spec/lib/swagger/rake_swagger_spec.rb'
1095
1013
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
1096
1014
 
1097
- # Offense count: 96
1015
+ # Offense count: 76
1098
1016
  # This cop supports unsafe autocorrection (--autocorrect-all).
1099
1017
  # Configuration parameters: SkipBlocks, EnforcedStyle.
1100
1018
  # SupportedStyles: described_class, explicit
@@ -1121,21 +1039,11 @@ RSpec/EmptyExampleGroup:
1121
1039
  Exclude:
1122
1040
  - 'spec/lib/apipie/generator/swagger/param_description/composite_spec.rb'
1123
1041
 
1124
- # Offense count: 11
1125
- # This cop supports safe autocorrection (--autocorrect).
1126
- # Configuration parameters: AllowConsecutiveOneLiners.
1127
- RSpec/EmptyLineAfterExample:
1128
- Exclude:
1129
- - 'spec/lib/apipie/apipies_controller_spec.rb'
1130
- - 'spec/lib/apipie/generator/swagger/context_spec.rb'
1131
- - 'spec/lib/swagger/swagger_dsl_spec.rb'
1132
-
1133
- # Offense count: 6
1042
+ # Offense count: 2
1134
1043
  # This cop supports safe autocorrection (--autocorrect).
1135
1044
  RSpec/EmptyLineAfterExampleGroup:
1136
1045
  Exclude:
1137
1046
  - 'spec/controllers/users_controller_spec.rb'
1138
- - 'spec/lib/apipie/param_description_spec.rb'
1139
1047
 
1140
1048
  # Offense count: 1
1141
1049
  # This cop supports safe autocorrection (--autocorrect).
@@ -1143,20 +1051,19 @@ RSpec/EmptyLineAfterFinalLet:
1143
1051
  Exclude:
1144
1052
  - 'spec/lib/validators/array_validator_spec.rb'
1145
1053
 
1146
- # Offense count: 4
1054
+ # Offense count: 3
1147
1055
  # This cop supports safe autocorrection (--autocorrect).
1148
1056
  # Configuration parameters: AllowConsecutiveOneLiners.
1149
1057
  RSpec/EmptyLineAfterHook:
1150
1058
  Exclude:
1151
1059
  - 'spec/lib/apipie/apipies_controller_spec.rb'
1152
- - 'spec/lib/apipie/application_spec.rb'
1153
1060
 
1154
- # Offense count: 48
1061
+ # Offense count: 51
1155
1062
  # Configuration parameters: CountAsOne.
1156
1063
  RSpec/ExampleLength:
1157
1064
  Max: 85
1158
1065
 
1159
- # Offense count: 165
1066
+ # Offense count: 159
1160
1067
  # This cop supports safe autocorrection (--autocorrect).
1161
1068
  # Configuration parameters: CustomTransform, IgnoredWords, DisallowedExamples.
1162
1069
  # DisallowedExamples: works
@@ -1190,25 +1097,20 @@ RSpec/ExpectInHook:
1190
1097
  Exclude:
1191
1098
  - 'spec/lib/apipie/extractor/writer_spec.rb'
1192
1099
 
1193
- # Offense count: 8
1100
+ # Offense count: 2
1194
1101
  # This cop supports safe autocorrection (--autocorrect).
1195
1102
  # Configuration parameters: EnforcedStyle.
1196
1103
  # SupportedStyles: implicit, each, example
1197
1104
  RSpec/HookArgument:
1198
1105
  Exclude:
1199
- - 'spec/controllers/pets_controller_spec.rb'
1200
1106
  - 'spec/lib/apipie/extractor/writer_spec.rb'
1201
- - 'spec/lib/apipie/method_description_spec.rb'
1202
- - 'spec/lib/apipie/resource_description_spec.rb'
1203
1107
 
1204
- # Offense count: 5
1108
+ # Offense count: 3
1205
1109
  # This cop supports safe autocorrection (--autocorrect).
1206
1110
  RSpec/HooksBeforeExamples:
1207
1111
  Exclude:
1208
1112
  - 'spec/controllers/users_controller_spec.rb'
1209
- - 'spec/lib/apipie/application_spec.rb'
1210
1113
  - 'spec/lib/apipie/extractor/writer_spec.rb'
1211
- - 'spec/lib/apipie/param_description_spec.rb'
1212
1114
 
1213
1115
  # Offense count: 2
1214
1116
  # This cop supports safe autocorrection (--autocorrect).
@@ -1218,15 +1120,13 @@ RSpec/ImplicitSubject:
1218
1120
  Exclude:
1219
1121
  - 'spec/lib/apipie/application_spec.rb'
1220
1122
 
1221
- # Offense count: 30
1123
+ # Offense count: 2
1222
1124
  # Configuration parameters: AssignmentOnly.
1223
1125
  RSpec/InstanceVariable:
1224
1126
  Exclude:
1225
1127
  - 'spec/lib/apipie/apipies_controller_spec.rb'
1226
- - 'spec/lib/apipie/method_description_spec.rb'
1227
- - 'spec/lib/apipie/resource_description_spec.rb'
1228
1128
 
1229
- # Offense count: 9
1129
+ # Offense count: 8
1230
1130
  # This cop supports safe autocorrection (--autocorrect).
1231
1131
  RSpec/LeadingSubject:
1232
1132
  Exclude:
@@ -1236,7 +1136,6 @@ RSpec/LeadingSubject:
1236
1136
  - 'spec/lib/apipie/generator/swagger/param_description/name_spec.rb'
1237
1137
  - 'spec/lib/apipie/generator/swagger/param_description/type_spec.rb'
1238
1138
  - 'spec/lib/apipie/generator/swagger/param_description_spec.rb'
1239
- - 'spec/lib/apipie/generator/swagger/type_extractor_spec.rb'
1240
1139
  - 'spec/support/rake.rb'
1241
1140
 
1242
1141
  # Offense count: 1
@@ -1250,16 +1149,16 @@ RSpec/LeakyConstantDeclaration:
1250
1149
  RSpec/MessageSpies:
1251
1150
  EnforcedStyle: receive
1252
1151
 
1253
- # Offense count: 98
1152
+ # Offense count: 94
1254
1153
  RSpec/MultipleExpectations:
1255
1154
  Max: 19
1256
1155
 
1257
- # Offense count: 64
1156
+ # Offense count: 154
1258
1157
  # Configuration parameters: AllowSubject.
1259
1158
  RSpec/MultipleMemoizedHelpers:
1260
1159
  Max: 15
1261
1160
 
1262
- # Offense count: 64
1161
+ # Offense count: 83
1263
1162
  # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
1264
1163
  # SupportedStyles: always, named_only
1265
1164
  RSpec/NamedSubject:
@@ -1271,7 +1170,6 @@ RSpec/NamedSubject:
1271
1170
  - 'spec/lib/apipie/generator/swagger/param_description/builder_spec.rb'
1272
1171
  - 'spec/lib/apipie/generator/swagger/param_description/type_spec.rb'
1273
1172
  - 'spec/lib/apipie/generator/swagger/param_description_spec.rb'
1274
- - 'spec/lib/apipie/generator/swagger/type_extractor_spec.rb'
1275
1173
  - 'spec/lib/apipie/generator/swagger/warning_spec.rb'
1276
1174
  - 'spec/lib/apipie/generator/swagger/warning_writer_spec.rb'
1277
1175
  - 'spec/lib/apipie/method_description/apis_service_spec.rb'
@@ -1281,7 +1179,7 @@ RSpec/NamedSubject:
1281
1179
  - 'spec/lib/swagger/rake_swagger_spec.rb'
1282
1180
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
1283
1181
 
1284
- # Offense count: 51
1182
+ # Offense count: 89
1285
1183
  # Configuration parameters: AllowedGroups.
1286
1184
  RSpec/NestedGroups:
1287
1185
  Max: 6
@@ -1294,14 +1192,13 @@ RSpec/NoExpectationExample:
1294
1192
  - 'spec/controllers/users_controller_spec.rb'
1295
1193
  - 'spec/test_engine/memes_controller_spec.rb'
1296
1194
 
1297
- # Offense count: 11
1195
+ # Offense count: 2
1298
1196
  # This cop supports safe autocorrection (--autocorrect).
1299
1197
  # Configuration parameters: EnforcedStyle.
1300
1198
  # SupportedStyles: not_to, to_not
1301
1199
  RSpec/NotToNot:
1302
1200
  Exclude:
1303
1201
  - 'spec/lib/apipie/file_handler_spec.rb'
1304
- - 'spec/lib/apipie/param_description_spec.rb'
1305
1202
 
1306
1203
  # Offense count: 1
1307
1204
  RSpec/OverwritingSetup:
@@ -1329,22 +1226,15 @@ RSpec/Rails/InferredSpecType:
1329
1226
  Exclude:
1330
1227
  - 'spec/controllers/pets_controller_spec.rb'
1331
1228
 
1332
- # Offense count: 4
1333
- RSpec/RepeatedExample:
1334
- Exclude:
1335
- - 'spec/lib/apipie/method_description_spec.rb'
1336
- - 'spec/lib/apipie/resource_description_spec.rb'
1337
-
1338
1229
  # Offense count: 2
1339
1230
  RSpec/RepeatedExampleGroupBody:
1340
1231
  Exclude:
1341
1232
  - 'spec/lib/apipie/generator/swagger/warning_spec.rb'
1342
1233
 
1343
- # Offense count: 4
1234
+ # Offense count: 2
1344
1235
  RSpec/RepeatedExampleGroupDescription:
1345
1236
  Exclude:
1346
1237
  - 'spec/lib/apipie/apipies_controller_spec.rb'
1347
- - 'spec/lib/apipie/application_spec.rb'
1348
1238
 
1349
1239
  # Offense count: 2
1350
1240
  RSpec/StubbedMock:
@@ -1407,23 +1297,16 @@ Rails/HttpStatus:
1407
1297
  - 'spec/dummy/app/controllers/pets_controller.rb'
1408
1298
  - 'spec/dummy/app/controllers/users_controller.rb'
1409
1299
 
1410
- # Offense count: 1
1411
- # This cop supports safe autocorrection (--autocorrect).
1412
- Rails/IndexBy:
1413
- Exclude:
1414
- - 'lib/apipie/swagger_generator.rb'
1415
-
1416
- # Offense count: 6
1300
+ # Offense count: 4
1417
1301
  # This cop supports unsafe autocorrection (--autocorrect-all).
1418
1302
  Rails/NegateInclude:
1419
1303
  Exclude:
1420
1304
  - 'lib/apipie/extractor/collector.rb'
1421
1305
  - 'lib/apipie/extractor/writer.rb'
1422
1306
  - 'lib/apipie/generator/swagger/warning.rb'
1423
- - 'lib/apipie/swagger_generator.rb'
1424
1307
  - 'spec/spec_helper.rb'
1425
1308
 
1426
- # Offense count: 8
1309
+ # Offense count: 7
1427
1310
  # This cop supports unsafe autocorrection (--autocorrect-all).
1428
1311
  # Configuration parameters: Include.
1429
1312
  # Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb
@@ -1432,22 +1315,21 @@ Rails/Output:
1432
1315
  - 'lib/apipie/apipie_module.rb'
1433
1316
  - 'lib/apipie/extractor.rb'
1434
1317
  - 'lib/apipie/rspec/response_validation_helper.rb'
1435
- - 'lib/apipie/swagger_generator.rb'
1436
1318
 
1437
1319
  # Offense count: 2
1438
1320
  Rails/OutputSafety:
1439
1321
  Exclude:
1440
1322
  - 'lib/apipie/helpers.rb'
1441
1323
 
1442
- # Offense count: 6
1443
- # This cop supports unsafe autocorrection (--autocorrect-all).
1324
+ # Offense count: 3
1325
+ # This cop supports safe autocorrection (--autocorrect).
1444
1326
  Rails/Pluck:
1445
1327
  Exclude:
1446
1328
  - 'lib/apipie/extractor/writer.rb'
1447
1329
  - 'spec/lib/apipie/method_description_spec.rb'
1448
1330
  - 'spec/lib/apipie/resource_description_spec.rb'
1449
1331
 
1450
- # Offense count: 5
1332
+ # Offense count: 4
1451
1333
  # This cop supports safe autocorrection (--autocorrect).
1452
1334
  # Configuration parameters: NotNilAndNotEmpty, NotBlank, UnlessBlank.
1453
1335
  Rails/Present:
@@ -1479,14 +1361,6 @@ Rails/RootPathnameMethods:
1479
1361
  - 'spec/lib/rake_spec.rb'
1480
1362
  - 'spec/lib/swagger/rake_swagger_spec.rb'
1481
1363
 
1482
- # Offense count: 4
1483
- # This cop supports unsafe autocorrection (--autocorrect-all).
1484
- # Configuration parameters: EnforcedStyle.
1485
- # SupportedStyles: strict, flexible
1486
- Rails/TimeZone:
1487
- Exclude:
1488
- - 'lib/tasks/apipie.rake'
1489
-
1490
1364
  # Offense count: 1
1491
1365
  # This cop supports unsafe autocorrection (--autocorrect-all).
1492
1366
  Security/IoMethods:
@@ -1512,7 +1386,7 @@ Style/AndOr:
1512
1386
 
1513
1387
  # Offense count: 17
1514
1388
  # This cop supports safe autocorrection (--autocorrect).
1515
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
1389
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
1516
1390
  # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
1517
1391
  # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
1518
1392
  # FunctionalMethods: let, let!, subject, watch
@@ -1532,7 +1406,7 @@ Style/CaseEquality:
1532
1406
  Exclude:
1533
1407
  - 'lib/apipie/validator.rb'
1534
1408
 
1535
- # Offense count: 28
1409
+ # Offense count: 43
1536
1410
  # This cop supports unsafe autocorrection (--autocorrect-all).
1537
1411
  # Configuration parameters: EnforcedStyle.
1538
1412
  # SupportedStyles: nested, compact
@@ -1541,7 +1415,15 @@ Style/ClassAndModuleChildren:
1541
1415
  - 'lib/apipie/core_ext/route.rb'
1542
1416
  - 'lib/apipie/extractor.rb'
1543
1417
  - 'lib/apipie/generator/generator.rb'
1418
+ - 'lib/apipie/generator/swagger/computed_interface_id.rb'
1544
1419
  - 'lib/apipie/generator/swagger/context.rb'
1420
+ - 'lib/apipie/generator/swagger/method_description.rb'
1421
+ - 'lib/apipie/generator/swagger/method_description/api_decorator.rb'
1422
+ - 'lib/apipie/generator/swagger/method_description/api_schema_service.rb'
1423
+ - 'lib/apipie/generator/swagger/method_description/decorator.rb'
1424
+ - 'lib/apipie/generator/swagger/method_description/parameters_service.rb'
1425
+ - 'lib/apipie/generator/swagger/method_description/response_schema_service.rb'
1426
+ - 'lib/apipie/generator/swagger/method_description/response_service.rb'
1545
1427
  - 'lib/apipie/generator/swagger/operation_id.rb'
1546
1428
  - 'lib/apipie/generator/swagger/param_description.rb'
1547
1429
  - 'lib/apipie/generator/swagger/param_description/builder.rb'
@@ -1549,7 +1431,14 @@ Style/ClassAndModuleChildren:
1549
1431
  - 'lib/apipie/generator/swagger/param_description/description.rb'
1550
1432
  - 'lib/apipie/generator/swagger/param_description/in.rb'
1551
1433
  - 'lib/apipie/generator/swagger/param_description/name.rb'
1434
+ - 'lib/apipie/generator/swagger/param_description/path_params_composite.rb'
1435
+ - 'lib/apipie/generator/swagger/param_description/referenced_composite.rb'
1552
1436
  - 'lib/apipie/generator/swagger/param_description/type.rb'
1437
+ - 'lib/apipie/generator/swagger/path_decorator.rb'
1438
+ - 'lib/apipie/generator/swagger/referenced_definitions.rb'
1439
+ - 'lib/apipie/generator/swagger/resource_description_collection.rb'
1440
+ - 'lib/apipie/generator/swagger/resource_description_composite.rb'
1441
+ - 'lib/apipie/generator/swagger/schema.rb'
1553
1442
  - 'lib/apipie/generator/swagger/swagger.rb'
1554
1443
  - 'lib/apipie/generator/swagger/type.rb'
1555
1444
  - 'lib/apipie/generator/swagger/type_extractor.rb'
@@ -1574,25 +1463,18 @@ Style/ClassCheck:
1574
1463
 
1575
1464
  # Offense count: 2
1576
1465
  # This cop supports safe autocorrection (--autocorrect).
1577
- # Configuration parameters: AllowedMethods, AllowedPatterns.
1466
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
1578
1467
  # AllowedMethods: ==, equal?, eql?
1579
1468
  Style/ClassEqualityComparison:
1580
1469
  Exclude:
1581
1470
  - 'lib/apipie/application.rb'
1582
1471
  - 'lib/apipie/validator.rb'
1583
1472
 
1584
- # Offense count: 1
1585
- # This cop supports unsafe autocorrection (--autocorrect-all).
1586
- Style/CollectionCompact:
1587
- Exclude:
1588
- - 'lib/apipie/swagger_generator.rb'
1589
-
1590
- # Offense count: 20
1473
+ # Offense count: 19
1591
1474
  # This cop supports safe autocorrection (--autocorrect).
1592
1475
  Style/ColonMethodCall:
1593
1476
  Exclude:
1594
1477
  - 'lib/apipie/rspec/response_validation_helper.rb'
1595
- - 'lib/apipie/swagger_generator.rb'
1596
1478
  - 'lib/apipie/validator.rb'
1597
1479
  - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb'
1598
1480
  - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb'
@@ -1615,7 +1497,7 @@ Style/CommentedKeyword:
1615
1497
  - 'lib/apipie/dsl_definition.rb'
1616
1498
  - 'lib/apipie/extractor/recorder.rb'
1617
1499
 
1618
- # Offense count: 11
1500
+ # Offense count: 9
1619
1501
  # This cop supports safe autocorrection (--autocorrect).
1620
1502
  # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
1621
1503
  # SupportedStyles: assign_to_condition, assign_inside_condition
@@ -1626,7 +1508,6 @@ Style/ConditionalAssignment:
1626
1508
  - 'lib/apipie/param_description.rb'
1627
1509
  - 'lib/apipie/response_description.rb'
1628
1510
  - 'lib/apipie/see_description.rb'
1629
- - 'lib/apipie/swagger_generator.rb'
1630
1511
  - 'lib/tasks/apipie.rake'
1631
1512
 
1632
1513
  # Offense count: 1
@@ -1637,7 +1518,7 @@ Style/DoubleNegation:
1637
1518
  Exclude:
1638
1519
  - 'lib/apipie/response_description_adapter.rb'
1639
1520
 
1640
- # Offense count: 3
1521
+ # Offense count: 2
1641
1522
  # This cop supports safe autocorrection (--autocorrect).
1642
1523
  Style/EachWithObject:
1643
1524
  Exclude:
@@ -1703,171 +1584,22 @@ Style/FileWrite:
1703
1584
  Exclude:
1704
1585
  - 'lib/tasks/apipie.rake'
1705
1586
 
1706
- # Offense count: 6
1587
+ # Offense count: 2
1707
1588
  # This cop supports unsafe autocorrection (--autocorrect-all).
1708
1589
  # Configuration parameters: EnforcedStyle.
1709
1590
  # SupportedStyles: each, for
1710
1591
  Style/For:
1711
1592
  Exclude:
1712
1593
  - 'lib/apipie/response_description_adapter.rb'
1713
- - 'lib/apipie/swagger_generator.rb'
1714
1594
 
1715
- # Offense count: 8
1595
+ # Offense count: 7
1716
1596
  # This cop supports safe autocorrection (--autocorrect).
1717
- # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
1597
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns, IgnoredMethods.
1718
1598
  # SupportedStyles: annotated, template, unannotated
1719
- # AllowedMethods: redirect
1720
1599
  Style/FormatStringToken:
1721
1600
  EnforcedStyle: template
1722
1601
 
1723
- # Offense count: 140
1724
- # This cop supports unsafe autocorrection (--autocorrect-all).
1725
- # Configuration parameters: EnforcedStyle.
1726
- # SupportedStyles: always, always_true, never
1727
- Style/FrozenStringLiteralComment:
1728
- Exclude:
1729
- - 'Rakefile'
1730
- - 'apipie-rails.gemspec'
1731
- - 'app/controllers/apipie/apipies_controller.rb'
1732
- - 'app/helpers/apipie_helper.rb'
1733
- - 'lib/apipie-rails.rb'
1734
- - 'lib/apipie/apipie_module.rb'
1735
- - 'lib/apipie/application.rb'
1736
- - 'lib/apipie/configuration.rb'
1737
- - 'lib/apipie/core_ext/route.rb'
1738
- - 'lib/apipie/dsl_definition.rb'
1739
- - 'lib/apipie/error_description.rb'
1740
- - 'lib/apipie/errors.rb'
1741
- - 'lib/apipie/extractor.rb'
1742
- - 'lib/apipie/extractor/collector.rb'
1743
- - 'lib/apipie/extractor/recorder.rb'
1744
- - 'lib/apipie/extractor/writer.rb'
1745
- - 'lib/apipie/generator/generator.rb'
1746
- - 'lib/apipie/generator/swagger/context.rb'
1747
- - 'lib/apipie/generator/swagger/operation_id.rb'
1748
- - 'lib/apipie/generator/swagger/param_description.rb'
1749
- - 'lib/apipie/generator/swagger/param_description/builder.rb'
1750
- - 'lib/apipie/generator/swagger/param_description/composite.rb'
1751
- - 'lib/apipie/generator/swagger/param_description/description.rb'
1752
- - 'lib/apipie/generator/swagger/param_description/in.rb'
1753
- - 'lib/apipie/generator/swagger/param_description/name.rb'
1754
- - 'lib/apipie/generator/swagger/param_description/type.rb'
1755
- - 'lib/apipie/generator/swagger/swagger.rb'
1756
- - 'lib/apipie/generator/swagger/type.rb'
1757
- - 'lib/apipie/generator/swagger/type_extractor.rb'
1758
- - 'lib/apipie/generator/swagger/warning.rb'
1759
- - 'lib/apipie/generator/swagger/warning_writer.rb'
1760
- - 'lib/apipie/helpers.rb'
1761
- - 'lib/apipie/markup.rb'
1762
- - 'lib/apipie/method_description.rb'
1763
- - 'lib/apipie/method_description/api.rb'
1764
- - 'lib/apipie/method_description/apis_service.rb'
1765
- - 'lib/apipie/middleware/checksum_in_headers.rb'
1766
- - 'lib/apipie/param_description.rb'
1767
- - 'lib/apipie/railtie.rb'
1768
- - 'lib/apipie/resource_description.rb'
1769
- - 'lib/apipie/response_description.rb'
1770
- - 'lib/apipie/response_description_adapter.rb'
1771
- - 'lib/apipie/routes_formatter.rb'
1772
- - 'lib/apipie/routing.rb'
1773
- - 'lib/apipie/rspec/response_validation_helper.rb'
1774
- - 'lib/apipie/see_description.rb'
1775
- - 'lib/apipie/static_dispatcher.rb'
1776
- - 'lib/apipie/swagger_generator.rb'
1777
- - 'lib/apipie/tag_list_description.rb'
1778
- - 'lib/apipie/validator.rb'
1779
- - 'lib/apipie/version.rb'
1780
- - 'lib/generators/apipie/install/install_generator.rb'
1781
- - 'lib/generators/apipie/views_generator.rb'
1782
- - 'lib/tasks/apipie.rake'
1783
- - 'spec/controllers/api/v1/architectures_controller_spec.rb'
1784
- - 'spec/controllers/api/v2/architectures_controller_spec.rb'
1785
- - 'spec/controllers/api/v2/nested/resources_controller_spec.rb'
1786
- - 'spec/controllers/concerns_controller_spec.rb'
1787
- - 'spec/controllers/extended_controller_spec.rb'
1788
- - 'spec/controllers/included_param_group_controller_spec.rb'
1789
- - 'spec/controllers/pets_controller_spec.rb'
1790
- - 'spec/controllers/users_controller_spec.rb'
1791
- - 'spec/dummy/Rakefile'
1792
- - 'spec/dummy/app/controllers/api/base_controller.rb'
1793
- - 'spec/dummy/app/controllers/api/v1/architectures_controller.rb'
1794
- - 'spec/dummy/app/controllers/api/v1/base_controller.rb'
1795
- - 'spec/dummy/app/controllers/api/v2/architectures_controller.rb'
1796
- - 'spec/dummy/app/controllers/api/v2/base_controller.rb'
1797
- - 'spec/dummy/app/controllers/api/v2/nested/architectures_controller.rb'
1798
- - 'spec/dummy/app/controllers/api/v2/nested/resources_controller.rb'
1799
- - 'spec/dummy/app/controllers/application_controller.rb'
1800
- - 'spec/dummy/app/controllers/concerns_controller.rb'
1801
- - 'spec/dummy/app/controllers/extended_controller.rb'
1802
- - 'spec/dummy/app/controllers/extending_concern.rb'
1803
- - 'spec/dummy/app/controllers/files_controller.rb'
1804
- - 'spec/dummy/app/controllers/included_param_group_controller.rb'
1805
- - 'spec/dummy/app/controllers/overridden_concerns_controller.rb'
1806
- - 'spec/dummy/app/controllers/pets_controller.rb'
1807
- - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb'
1808
- - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb'
1809
- - 'spec/dummy/app/controllers/sample_controller.rb'
1810
- - 'spec/dummy/app/controllers/tagged_cats_controller.rb'
1811
- - 'spec/dummy/app/controllers/tagged_dogs_controller.rb'
1812
- - 'spec/dummy/app/controllers/twitter_example_controller.rb'
1813
- - 'spec/dummy/app/controllers/users_controller.rb'
1814
- - 'spec/dummy/app/helpers/random_param_group.rb'
1815
- - 'spec/dummy/components/test_engine/Gemfile'
1816
- - 'spec/dummy/components/test_engine/app/controllers/test_engine/application_controller.rb'
1817
- - 'spec/dummy/components/test_engine/app/controllers/test_engine/memes_controller.rb'
1818
- - 'spec/dummy/components/test_engine/config/routes.rb'
1819
- - 'spec/dummy/components/test_engine/lib/test_engine.rb'
1820
- - 'spec/dummy/components/test_engine/test_engine.gemspec'
1821
- - 'spec/dummy/config.ru'
1822
- - 'spec/dummy/config/application.rb'
1823
- - 'spec/dummy/config/boot.rb'
1824
- - 'spec/dummy/config/environment.rb'
1825
- - 'spec/dummy/config/environments/development.rb'
1826
- - 'spec/dummy/config/environments/production.rb'
1827
- - 'spec/dummy/config/environments/test.rb'
1828
- - 'spec/dummy/config/initializers/apipie.rb'
1829
- - 'spec/dummy/config/initializers/backtrace_silencers.rb'
1830
- - 'spec/dummy/config/initializers/inflections.rb'
1831
- - 'spec/dummy/config/initializers/mime_types.rb'
1832
- - 'spec/dummy/config/initializers/secret_token.rb'
1833
- - 'spec/dummy/config/initializers/session_store.rb'
1834
- - 'spec/dummy/config/routes.rb'
1835
- - 'spec/dummy/script/rails'
1836
- - 'spec/lib/apipie/apipies_controller_spec.rb'
1837
- - 'spec/lib/apipie/application_spec.rb'
1838
- - 'spec/lib/apipie/extractor/recorder/middleware_spec.rb'
1839
- - 'spec/lib/apipie/extractor/writer_spec.rb'
1840
- - 'spec/lib/apipie/extractor_spec.rb'
1841
- - 'spec/lib/apipie/file_handler_spec.rb'
1842
- - 'spec/lib/apipie/generator/swagger/context_spec.rb'
1843
- - 'spec/lib/apipie/generator/swagger/operation_id_spec.rb'
1844
- - 'spec/lib/apipie/generator/swagger/param_description/builder_spec.rb'
1845
- - 'spec/lib/apipie/generator/swagger/param_description/composite_spec.rb'
1846
- - 'spec/lib/apipie/generator/swagger/param_description/description_spec.rb'
1847
- - 'spec/lib/apipie/generator/swagger/param_description/in_spec.rb'
1848
- - 'spec/lib/apipie/generator/swagger/param_description/name_spec.rb'
1849
- - 'spec/lib/apipie/generator/swagger/param_description/type_spec.rb'
1850
- - 'spec/lib/apipie/generator/swagger/param_description_spec.rb'
1851
- - 'spec/lib/apipie/generator/swagger/type_extractor_spec.rb'
1852
- - 'spec/lib/apipie/generator/swagger/warning_spec.rb'
1853
- - 'spec/lib/apipie/generator/swagger/warning_writer_spec.rb'
1854
- - 'spec/lib/apipie/method_description/apis_service_spec.rb'
1855
- - 'spec/lib/apipie/method_description_spec.rb'
1856
- - 'spec/lib/apipie/param_description/deprecation_spec.rb'
1857
- - 'spec/lib/apipie/param_description_spec.rb'
1858
- - 'spec/lib/apipie/param_group_spec.rb'
1859
- - 'spec/lib/apipie/resource_description_spec.rb'
1860
- - 'spec/lib/apipie/validator_spec.rb'
1861
- - 'spec/lib/rake_spec.rb'
1862
- - 'spec/lib/swagger/rake_swagger_spec.rb'
1863
- - 'spec/lib/swagger/swagger_dsl_spec.rb'
1864
- - 'spec/lib/validators/array_validator_spec.rb'
1865
- - 'spec/spec_helper.rb'
1866
- - 'spec/support/custom_bool_validator.rb'
1867
- - 'spec/support/rake.rb'
1868
- - 'spec/test_engine/memes_controller_spec.rb'
1869
-
1870
- # Offense count: 34
1602
+ # Offense count: 33
1871
1603
  # This cop supports safe autocorrection (--autocorrect).
1872
1604
  # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
1873
1605
  Style/GuardClause:
@@ -1883,70 +1615,30 @@ Style/GuardClause:
1883
1615
  - 'lib/apipie/resource_description.rb'
1884
1616
  - 'lib/apipie/rspec/response_validation_helper.rb'
1885
1617
  - 'lib/apipie/static_dispatcher.rb'
1886
- - 'lib/apipie/swagger_generator.rb'
1887
1618
  - 'lib/apipie/validator.rb'
1888
1619
  - 'spec/dummy/app/controllers/application_controller.rb'
1889
1620
  - 'spec/dummy/config/initializers/apipie.rb'
1890
1621
 
1891
- # Offense count: 1
1892
- # This cop supports safe autocorrection (--autocorrect).
1893
- # Configuration parameters: AllowSplatArgument.
1894
- Style/HashConversion:
1895
- Exclude:
1896
- - 'lib/apipie/swagger_generator.rb'
1897
-
1898
1622
  # Offense count: 1
1899
1623
  # This cop supports unsafe autocorrection (--autocorrect-all).
1900
1624
  Style/HashExcept:
1901
1625
  Exclude:
1902
1626
  - 'lib/apipie/param_description.rb'
1903
1627
 
1904
- # Offense count: 4
1628
+ # Offense count: 1
1905
1629
  # This cop supports safe autocorrection (--autocorrect).
1906
1630
  # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
1907
1631
  # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
1908
1632
  # SupportedShorthandSyntax: always, never, either, consistent
1909
1633
  Style/HashSyntax:
1910
1634
  Exclude:
1911
- - 'lib/apipie/swagger_generator.rb'
1912
1635
  - 'spec/dummy/config/routes.rb'
1913
1636
 
1914
- # Offense count: 3
1637
+ # Offense count: 1
1915
1638
  # This cop supports safe autocorrection (--autocorrect).
1916
1639
  # Configuration parameters: AllowIfModifier.
1917
1640
  Style/IfInsideElse:
1918
1641
  Exclude:
1919
- - 'lib/apipie/application.rb'
1920
- - 'lib/apipie/swagger_generator.rb'
1921
- - 'spec/spec_helper.rb'
1922
-
1923
- # Offense count: 73
1924
- # This cop supports safe autocorrection (--autocorrect).
1925
- Style/IfUnlessModifier:
1926
- Exclude:
1927
- - 'app/controllers/apipie/apipies_controller.rb'
1928
- - 'lib/apipie/application.rb'
1929
- - 'lib/apipie/dsl_definition.rb'
1930
- - 'lib/apipie/extractor.rb'
1931
- - 'lib/apipie/extractor/collector.rb'
1932
- - 'lib/apipie/extractor/writer.rb'
1933
- - 'lib/apipie/generator/swagger/param_description/composite.rb'
1934
- - 'lib/apipie/generator/swagger/param_description/type.rb'
1935
- - 'lib/apipie/generator/swagger/type_extractor.rb'
1936
- - 'lib/apipie/generator/swagger/warning.rb'
1937
- - 'lib/apipie/method_description.rb'
1938
- - 'lib/apipie/param_description.rb'
1939
- - 'lib/apipie/resource_description.rb'
1940
- - 'lib/apipie/routes_formatter.rb'
1941
- - 'lib/apipie/rspec/response_validation_helper.rb'
1942
- - 'lib/apipie/see_description.rb'
1943
- - 'lib/apipie/swagger_generator.rb'
1944
- - 'lib/apipie/validator.rb'
1945
- - 'lib/tasks/apipie.rake'
1946
- - 'spec/dummy/app/controllers/application_controller.rb'
1947
- - 'spec/dummy/app/controllers/users_controller.rb'
1948
- - 'spec/dummy/config/initializers/apipie.rb'
1949
- - 'spec/lib/swagger/swagger_dsl_spec.rb'
1950
1642
  - 'spec/spec_helper.rb'
1951
1643
 
1952
1644
  # Offense count: 4
@@ -1959,20 +1651,6 @@ Style/IfWithBooleanLiteralBranches:
1959
1651
  - 'lib/apipie/validator.rb'
1960
1652
  - 'lib/tasks/apipie.rake'
1961
1653
 
1962
- # Offense count: 13
1963
- # This cop supports unsafe autocorrection (--autocorrect-all).
1964
- # Configuration parameters: InverseMethods, InverseBlocks.
1965
- Style/InverseMethods:
1966
- Exclude:
1967
- - 'lib/apipie/configuration.rb'
1968
- - 'lib/apipie/extractor/collector.rb'
1969
- - 'lib/apipie/extractor/writer.rb'
1970
- - 'lib/apipie/generator/swagger/warning.rb'
1971
- - 'lib/apipie/method_description.rb'
1972
- - 'lib/apipie/param_description.rb'
1973
- - 'lib/apipie/swagger_generator.rb'
1974
- - 'spec/spec_helper.rb'
1975
-
1976
1654
  # Offense count: 5
1977
1655
  # This cop supports safe autocorrection (--autocorrect).
1978
1656
  # Configuration parameters: EnforcedStyle.
@@ -1986,7 +1664,7 @@ Style/Lambda:
1986
1664
 
1987
1665
  # Offense count: 2
1988
1666
  # This cop supports safe autocorrection (--autocorrect).
1989
- # Configuration parameters: AllowedMethods, AllowedPatterns.
1667
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
1990
1668
  Style/MethodCallWithoutArgsParentheses:
1991
1669
  Exclude:
1992
1670
  - 'lib/apipie/extractor/recorder.rb'
@@ -2012,13 +1690,6 @@ Style/MultilineBlockChain:
2012
1690
  Exclude:
2013
1691
  - 'lib/apipie/param_description.rb'
2014
1692
 
2015
- # Offense count: 1
2016
- # This cop supports safe autocorrection (--autocorrect).
2017
- # Configuration parameters: AllowMethodComparison.
2018
- Style/MultipleComparison:
2019
- Exclude:
2020
- - 'lib/apipie/validator.rb'
2021
-
2022
1693
  # Offense count: 7
2023
1694
  # This cop supports unsafe autocorrection (--autocorrect-all).
2024
1695
  # Configuration parameters: EnforcedStyle.
@@ -2032,7 +1703,7 @@ Style/MutableConstant:
2032
1703
  - 'lib/apipie/routes_formatter.rb'
2033
1704
  - 'lib/apipie/version.rb'
2034
1705
 
2035
- # Offense count: 13
1706
+ # Offense count: 8
2036
1707
  # This cop supports safe autocorrection (--autocorrect).
2037
1708
  # Configuration parameters: EnforcedStyle.
2038
1709
  # SupportedStyles: both, prefix, postfix
@@ -2044,7 +1715,6 @@ Style/NegatedIf:
2044
1715
  - 'lib/apipie/method_description/apis_service.rb'
2045
1716
  - 'lib/apipie/param_description.rb'
2046
1717
  - 'lib/apipie/rspec/response_validation_helper.rb'
2047
- - 'lib/apipie/swagger_generator.rb'
2048
1718
  - 'lib/apipie/validator.rb'
2049
1719
 
2050
1720
  # Offense count: 2
@@ -2068,14 +1738,13 @@ Style/NestedParenthesizedCalls:
2068
1738
  Style/NumericLiterals:
2069
1739
  MinDigits: 6
2070
1740
 
2071
- # Offense count: 11
1741
+ # Offense count: 7
2072
1742
  # Configuration parameters: AllowedMethods.
2073
1743
  # AllowedMethods: respond_to_missing?
2074
1744
  Style/OptionalBooleanParameter:
2075
1745
  Exclude:
2076
1746
  - 'lib/apipie/apipie_module.rb'
2077
1747
  - 'lib/apipie/application.rb'
2078
- - 'lib/apipie/swagger_generator.rb'
2079
1748
  - 'lib/tasks/apipie.rake'
2080
1749
 
2081
1750
  # Offense count: 3
@@ -2146,30 +1815,18 @@ Style/RedundantConditional:
2146
1815
  - 'lib/apipie/validator.rb'
2147
1816
  - 'lib/tasks/apipie.rake'
2148
1817
 
2149
- # Offense count: 9
2150
- # This cop supports safe autocorrection (--autocorrect).
2151
- Style/RedundantConstantBase:
2152
- Exclude:
2153
- - 'lib/tasks/apipie.rake'
2154
- - 'spec/dummy/config.ru'
2155
- - 'spec/lib/rake_spec.rb'
2156
- - 'spec/lib/swagger/rake_swagger_spec.rb'
2157
- - 'spec/spec_helper.rb'
2158
-
2159
- # Offense count: 5
1818
+ # Offense count: 3
2160
1819
  # This cop supports unsafe autocorrection (--autocorrect-all).
2161
1820
  Style/RedundantInterpolation:
2162
1821
  Exclude:
2163
- - 'lib/apipie/swagger_generator.rb'
2164
1822
  - 'lib/tasks/apipie.rake'
2165
1823
  - 'spec/lib/swagger/rake_swagger_spec.rb'
2166
1824
 
2167
- # Offense count: 2
1825
+ # Offense count: 1
2168
1826
  # This cop supports safe autocorrection (--autocorrect).
2169
1827
  Style/RedundantParentheses:
2170
1828
  Exclude:
2171
1829
  - 'lib/apipie/extractor/collector.rb'
2172
- - 'lib/apipie/swagger_generator.rb'
2173
1830
 
2174
1831
  # Offense count: 2
2175
1832
  # This cop supports safe autocorrection (--autocorrect).
@@ -2177,13 +1834,12 @@ Style/RedundantPercentQ:
2177
1834
  Exclude:
2178
1835
  - 'apipie-rails.gemspec'
2179
1836
 
2180
- # Offense count: 35
1837
+ # Offense count: 29
2181
1838
  # This cop supports safe autocorrection (--autocorrect).
2182
1839
  # Configuration parameters: AllowMultipleReturnValues.
2183
1840
  Style/RedundantReturn:
2184
1841
  Exclude:
2185
1842
  - 'lib/apipie/application.rb'
2186
- - 'lib/apipie/configuration.rb'
2187
1843
  - 'lib/apipie/dsl_definition.rb'
2188
1844
  - 'lib/apipie/extractor.rb'
2189
1845
  - 'lib/apipie/extractor/collector.rb'
@@ -2191,7 +1847,6 @@ Style/RedundantReturn:
2191
1847
  - 'lib/apipie/method_description.rb'
2192
1848
  - 'lib/apipie/middleware/checksum_in_headers.rb'
2193
1849
  - 'lib/apipie/param_description.rb'
2194
- - 'lib/apipie/swagger_generator.rb'
2195
1850
  - 'lib/apipie/validator.rb'
2196
1851
  - 'lib/tasks/apipie.rake'
2197
1852
 
@@ -2219,21 +1874,6 @@ Style/RedundantStringEscape:
2219
1874
  Exclude:
2220
1875
  - 'spec/dummy/app/controllers/users_controller.rb'
2221
1876
 
2222
- # Offense count: 12
2223
- # This cop supports safe autocorrection (--autocorrect).
2224
- # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
2225
- # SupportedStyles: slashes, percent_r, mixed
2226
- Style/RegexpLiteral:
2227
- Exclude:
2228
- - 'lib/apipie/extractor.rb'
2229
- - 'lib/apipie/extractor/collector.rb'
2230
- - 'lib/apipie/extractor/recorder.rb'
2231
- - 'lib/apipie/generator/swagger/operation_id.rb'
2232
- - 'lib/apipie/helpers.rb'
2233
- - 'lib/apipie/routing.rb'
2234
- - 'lib/apipie/swagger_generator.rb'
2235
- - 'lib/tasks/apipie.rake'
2236
-
2237
1877
  # Offense count: 1
2238
1878
  # This cop supports safe autocorrection (--autocorrect).
2239
1879
  # Configuration parameters: EnforcedStyle.
@@ -2288,16 +1928,15 @@ Style/SoleNestedConditional:
2288
1928
  Style/SpecialGlobalVars:
2289
1929
  EnforcedStyle: use_perl_names
2290
1930
 
2291
- # Offense count: 7
1931
+ # Offense count: 4
2292
1932
  # This cop supports unsafe autocorrection (--autocorrect-all).
2293
1933
  # Configuration parameters: Mode.
2294
1934
  Style/StringConcatenation:
2295
1935
  Exclude:
2296
1936
  - 'lib/apipie/application.rb'
2297
1937
  - 'lib/apipie/extractor/writer.rb'
2298
- - 'lib/apipie/swagger_generator.rb'
2299
1938
 
2300
- # Offense count: 1293
1939
+ # Offense count: 1196
2301
1940
  # This cop supports safe autocorrection (--autocorrect).
2302
1941
  # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
2303
1942
  # SupportedStyles: single_quotes, double_quotes
@@ -2326,7 +1965,6 @@ Style/StringLiterals:
2326
1965
  - 'lib/apipie/rspec/response_validation_helper.rb'
2327
1966
  - 'lib/apipie/see_description.rb'
2328
1967
  - 'lib/apipie/static_dispatcher.rb'
2329
- - 'lib/apipie/swagger_generator.rb'
2330
1968
  - 'lib/apipie/validator.rb'
2331
1969
  - 'lib/apipie/version.rb'
2332
1970
  - 'lib/generators/apipie/install/install_generator.rb'
@@ -2382,7 +2020,7 @@ Style/StringLiterals:
2382
2020
  - 'spec/support/rake.rb'
2383
2021
  - 'spec/test_engine/memes_controller_spec.rb'
2384
2022
 
2385
- # Offense count: 38
2023
+ # Offense count: 35
2386
2024
  # This cop supports safe autocorrection (--autocorrect).
2387
2025
  # Configuration parameters: MinSize.
2388
2026
  # SupportedStyles: percent, brackets
@@ -2398,7 +2036,7 @@ Style/TrailingCommaInArrayLiteral:
2398
2036
  - 'spec/controllers/users_controller_spec.rb'
2399
2037
  - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb'
2400
2038
 
2401
- # Offense count: 5
2039
+ # Offense count: 4
2402
2040
  # This cop supports safe autocorrection (--autocorrect).
2403
2041
  # Configuration parameters: EnforcedStyleForMultiline.
2404
2042
  # SupportedStylesForMultiline: comma, consistent_comma, no_comma
@@ -2407,7 +2045,6 @@ Style/TrailingCommaInHashLiteral:
2407
2045
  - 'lib/apipie/generator/swagger/param_description.rb'
2408
2046
  - 'lib/apipie/generator/swagger/param_description/builder.rb'
2409
2047
  - 'lib/apipie/response_description.rb'
2410
- - 'lib/apipie/swagger_generator.rb'
2411
2048
  - 'spec/controllers/users_controller_spec.rb'
2412
2049
 
2413
2050
  # Offense count: 1
@@ -2426,30 +2063,9 @@ Style/UnlessElse:
2426
2063
  - 'lib/apipie/validator.rb'
2427
2064
  - 'spec/lib/swagger/swagger_dsl_spec.rb'
2428
2065
 
2429
- # Offense count: 37
2430
- # This cop supports safe autocorrection (--autocorrect).
2431
- # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
2432
- # SupportedStyles: percent, brackets
2433
- Style/WordArray:
2434
- Exclude:
2435
- - 'lib/apipie/generator/swagger/param_description/in.rb'
2436
- - 'lib/apipie/swagger_generator.rb'
2437
- - 'spec/controllers/users_controller_spec.rb'
2438
- - 'spec/dummy/app/controllers/pets_controller.rb'
2439
- - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb'
2440
- - 'spec/dummy/app/controllers/twitter_example_controller.rb'
2441
- - 'spec/dummy/app/controllers/users_controller.rb'
2442
- - 'spec/lib/apipie/generator/swagger/param_description/type_spec.rb'
2443
- - 'spec/lib/apipie/method_description_spec.rb'
2444
- - 'spec/lib/apipie/resource_description_spec.rb'
2445
- - 'spec/lib/swagger/rake_swagger_spec.rb'
2446
- - 'spec/lib/swagger/swagger_dsl_spec.rb'
2447
- - 'spec/lib/validators/array_validator_spec.rb'
2448
-
2449
- # Offense count: 3
2066
+ # Offense count: 2
2450
2067
  # This cop supports unsafe autocorrection (--autocorrect-all).
2451
2068
  Style/ZeroLengthPredicate:
2452
2069
  Exclude:
2453
2070
  - 'lib/apipie/generator/swagger/param_description/composite.rb'
2454
- - 'lib/apipie/swagger_generator.rb'
2455
2071
  - 'spec/lib/swagger/swagger_dsl_spec.rb'