apipie-rails 0.5.19 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +31 -0
  3. data/.github/workflows/rubocop-challenger.yml +28 -0
  4. data/.github/workflows/rubocop.yml +18 -0
  5. data/.gitignore +1 -0
  6. data/.rubocop.yml +128 -0
  7. data/.rubocop_todo.yml +2056 -0
  8. data/.vscode/settings.json +3 -0
  9. data/CHANGELOG.md +161 -0
  10. data/Gemfile +20 -0
  11. data/README.rst +117 -23
  12. data/Rakefile +0 -5
  13. data/apipie-rails.gemspec +18 -9
  14. data/app/controllers/apipie/apipies_controller.rb +14 -29
  15. data/app/helpers/apipie_helper.rb +1 -1
  16. data/app/public/apipie/javascripts/bundled/bootstrap-collapse.js +70 -41
  17. data/app/public/apipie/javascripts/bundled/bootstrap.js +1033 -479
  18. data/app/public/apipie/javascripts/bundled/jquery.js +5 -5
  19. data/app/public/apipie/stylesheets/bundled/bootstrap-responsive.min.css +9 -12
  20. data/app/public/apipie/stylesheets/bundled/bootstrap.min.css +9 -689
  21. data/app/views/apipie/apipies/_deprecation.html.erb +16 -0
  22. data/app/views/apipie/apipies/_params.html.erb +7 -1
  23. data/config/locales/en.yml +8 -0
  24. data/config/locales/ko.yml +31 -0
  25. data/gemfiles/Gemfile.tools +9 -0
  26. data/lib/apipie/apipie_module.rb +7 -7
  27. data/lib/apipie/application.rb +132 -97
  28. data/lib/apipie/configuration.rb +43 -33
  29. data/lib/apipie/dsl_definition.rb +44 -33
  30. data/lib/apipie/error_description.rb +3 -3
  31. data/lib/apipie/errors.rb +17 -17
  32. data/lib/apipie/extractor/collector.rb +5 -6
  33. data/lib/apipie/extractor/recorder.rb +35 -8
  34. data/lib/apipie/extractor/writer.rb +15 -15
  35. data/lib/apipie/extractor.rb +6 -9
  36. data/lib/apipie/generator/config.rb +12 -0
  37. data/lib/apipie/generator/generator.rb +2 -0
  38. data/lib/apipie/generator/swagger/computed_interface_id.rb +23 -0
  39. data/lib/apipie/generator/swagger/config.rb +80 -0
  40. data/lib/apipie/generator/swagger/context.rb +38 -0
  41. data/lib/apipie/generator/swagger/method_description/api_decorator.rb +20 -0
  42. data/lib/apipie/generator/swagger/method_description/api_schema_service.rb +89 -0
  43. data/lib/apipie/generator/swagger/method_description/decorator.rb +22 -0
  44. data/lib/apipie/generator/swagger/method_description/parameters_service.rb +139 -0
  45. data/lib/apipie/generator/swagger/method_description/response_schema_service.rb +46 -0
  46. data/lib/apipie/generator/swagger/method_description/response_service.rb +58 -0
  47. data/lib/apipie/generator/swagger/method_description.rb +2 -0
  48. data/lib/apipie/generator/swagger/operation_id.rb +51 -0
  49. data/lib/apipie/generator/swagger/param_description/builder.rb +114 -0
  50. data/lib/apipie/generator/swagger/param_description/composite.rb +119 -0
  51. data/lib/apipie/generator/swagger/param_description/description.rb +15 -0
  52. data/lib/apipie/generator/swagger/param_description/in.rb +37 -0
  53. data/lib/apipie/generator/swagger/param_description/name.rb +18 -0
  54. data/lib/apipie/generator/swagger/param_description/path_params_composite.rb +61 -0
  55. data/lib/apipie/generator/swagger/param_description/referenced_composite.rb +36 -0
  56. data/lib/apipie/generator/swagger/param_description/type.rb +128 -0
  57. data/lib/apipie/generator/swagger/param_description.rb +18 -0
  58. data/lib/apipie/generator/swagger/path_decorator.rb +36 -0
  59. data/lib/apipie/generator/swagger/referenced_definitions.rb +17 -0
  60. data/lib/apipie/generator/swagger/resource_description_collection.rb +30 -0
  61. data/lib/apipie/generator/swagger/resource_description_composite.rb +56 -0
  62. data/lib/apipie/generator/swagger/schema.rb +63 -0
  63. data/lib/apipie/generator/swagger/swagger.rb +2 -0
  64. data/lib/apipie/generator/swagger/type.rb +16 -0
  65. data/lib/apipie/generator/swagger/type_extractor.rb +51 -0
  66. data/lib/apipie/generator/swagger/warning.rb +74 -0
  67. data/lib/apipie/generator/swagger/warning_writer.rb +54 -0
  68. data/lib/apipie/helpers.rb +3 -3
  69. data/lib/apipie/markup.rb +9 -8
  70. data/lib/apipie/method_description/api.rb +12 -0
  71. data/lib/apipie/method_description/apis_service.rb +82 -0
  72. data/lib/apipie/method_description.rb +12 -56
  73. data/lib/apipie/param_description/deprecation.rb +24 -0
  74. data/lib/apipie/param_description.rb +57 -24
  75. data/lib/apipie/resource_description.rb +42 -14
  76. data/lib/apipie/response_description.rb +3 -3
  77. data/lib/apipie/response_description_adapter.rb +12 -10
  78. data/lib/apipie/routing.rb +1 -1
  79. data/lib/apipie/rspec/response_validation_helper.rb +3 -3
  80. data/lib/apipie/static_dispatcher.rb +10 -2
  81. data/lib/apipie/swagger_generator.rb +28 -691
  82. data/lib/apipie/validator.rb +41 -11
  83. data/lib/apipie/version.rb +1 -1
  84. data/lib/apipie-rails.rb +36 -5
  85. data/lib/generators/apipie/install/install_generator.rb +1 -1
  86. data/lib/generators/apipie/views_generator.rb +1 -1
  87. data/lib/tasks/apipie.rake +37 -32
  88. data/rel-eng/gem_release.ipynb +41 -9
  89. data/spec/controllers/api/v2/architectures_controller_spec.rb +10 -3
  90. data/spec/controllers/api/v2/empty_middle_controller_spec.rb +23 -0
  91. data/spec/controllers/api/v2/nested/resources_controller_spec.rb +18 -2
  92. data/spec/controllers/api/v2/sub/footguns_controller_spec.rb +19 -0
  93. data/spec/controllers/included_param_group_controller_spec.rb +13 -0
  94. data/spec/{lib/swagger/response_validation_spec.rb → controllers/pets_controller_spec.rb} +26 -32
  95. data/spec/controllers/users_controller_spec.rb +47 -6
  96. data/spec/dummy/Rakefile +1 -1
  97. data/spec/dummy/app/controllers/api/v2/architectures_controller.rb +2 -1
  98. data/spec/dummy/app/controllers/api/v2/base_controller.rb +6 -0
  99. data/spec/dummy/app/controllers/api/v2/empty_middle_controller.rb +14 -0
  100. data/spec/dummy/app/controllers/api/v2/nested/resources_controller.rb +2 -2
  101. data/spec/dummy/app/controllers/api/v2/sub/footguns_controller.rb +30 -0
  102. data/spec/dummy/app/controllers/concerns_controller.rb +1 -1
  103. data/spec/dummy/app/controllers/{concerns/extending_concern.rb → extending_concern.rb} +0 -2
  104. data/spec/dummy/app/controllers/included_param_group_controller.rb +19 -0
  105. data/spec/dummy/app/controllers/overridden_concerns_controller.rb +2 -2
  106. data/spec/dummy/app/controllers/pets_controller.rb +5 -5
  107. data/spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb +2 -2
  108. data/spec/dummy/app/controllers/{concerns/sample_controller.rb → sample_controller.rb} +0 -2
  109. data/spec/dummy/app/controllers/twitter_example_controller.rb +2 -2
  110. data/spec/dummy/app/controllers/users_controller.rb +17 -5
  111. data/spec/dummy/app/helpers/random_param_group.rb +8 -0
  112. data/spec/dummy/components/test_engine/test_engine.gemspec +1 -1
  113. data/spec/dummy/config/application.rb +2 -5
  114. data/spec/dummy/config/boot.rb +2 -2
  115. data/spec/dummy/config/environment.rb +1 -1
  116. data/spec/dummy/config/environments/development.rb +0 -3
  117. data/spec/dummy/config/environments/production.rb +0 -3
  118. data/spec/dummy/config/environments/test.rb +0 -5
  119. data/spec/dummy/config/initializers/apipie.rb +2 -2
  120. data/spec/dummy/config/routes.rb +8 -0
  121. data/spec/dummy/config.ru +1 -1
  122. data/spec/dummy/script/rails +2 -2
  123. data/spec/{controllers → lib/apipie}/apipies_controller_spec.rb +95 -23
  124. data/spec/lib/apipie/application_spec.rb +62 -0
  125. data/spec/lib/apipie/configuration_spec.rb +38 -0
  126. data/spec/lib/apipie/extractor/collector_spec.rb +57 -0
  127. data/spec/lib/apipie/extractor/recorder_spec.rb +77 -0
  128. data/spec/lib/{extractor → apipie/extractor}/writer_spec.rb +8 -6
  129. data/spec/lib/{extractor → apipie}/extractor_spec.rb +1 -1
  130. data/spec/lib/{file_handler_spec.rb → apipie/file_handler_spec.rb} +7 -0
  131. data/spec/lib/apipie/generator/swagger/config_spec.rb +19 -0
  132. data/spec/lib/apipie/generator/swagger/context_spec.rb +56 -0
  133. data/spec/lib/apipie/generator/swagger/method_description/api_schema_service_spec.rb +119 -0
  134. data/spec/lib/apipie/generator/swagger/method_description/response_schema_service_spec.rb +105 -0
  135. data/spec/lib/apipie/generator/swagger/operation_id_spec.rb +63 -0
  136. data/spec/lib/apipie/generator/swagger/param_description/builder_spec.rb +215 -0
  137. data/spec/lib/apipie/generator/swagger/param_description/composite_spec.rb +95 -0
  138. data/spec/lib/apipie/generator/swagger/param_description/description_spec.rb +79 -0
  139. data/spec/lib/apipie/generator/swagger/param_description/in_spec.rb +86 -0
  140. data/spec/lib/apipie/generator/swagger/param_description/name_spec.rb +81 -0
  141. data/spec/lib/apipie/generator/swagger/param_description/type_spec.rb +183 -0
  142. data/spec/lib/apipie/generator/swagger/param_description_spec.rb +28 -0
  143. data/spec/lib/apipie/generator/swagger/path_decorator_spec.rb +57 -0
  144. data/spec/lib/apipie/generator/swagger/referenced_definitions_spec.rb +35 -0
  145. data/spec/lib/apipie/generator/swagger/resource_description_composite_spec.rb +37 -0
  146. data/spec/lib/apipie/generator/swagger/resource_descriptions_collection_spec.rb +57 -0
  147. data/spec/lib/apipie/generator/swagger/schema_spec.rb +89 -0
  148. data/spec/lib/apipie/generator/swagger/type_extractor_spec.rb +38 -0
  149. data/spec/lib/apipie/generator/swagger/warning_spec.rb +51 -0
  150. data/spec/lib/apipie/generator/swagger/warning_writer_spec.rb +71 -0
  151. data/spec/lib/apipie/method_description/apis_service_spec.rb +60 -0
  152. data/spec/lib/apipie/method_description_spec.rb +133 -0
  153. data/spec/lib/apipie/no_documented_method_spec.rb +17 -0
  154. data/spec/lib/apipie/param_description/deprecation_spec.rb +31 -0
  155. data/spec/lib/{param_description_spec.rb → apipie/param_description_spec.rb} +332 -6
  156. data/spec/lib/{param_group_spec.rb → apipie/param_group_spec.rb} +6 -5
  157. data/spec/lib/apipie/resource_description_spec.rb +91 -0
  158. data/spec/lib/apipie/response_does_not_match_swagger_schema_spec.rb +35 -0
  159. data/spec/lib/apipie/swagger_generator_spec.rb +94 -0
  160. data/spec/lib/{validator_spec.rb → apipie/validator_spec.rb} +48 -12
  161. data/spec/lib/rake_spec.rb +3 -5
  162. data/spec/lib/swagger/openapi_2_0_schema.json +8 -1
  163. data/spec/lib/swagger/rake_swagger_spec.rb +30 -10
  164. data/spec/lib/swagger/swagger_dsl_spec.rb +18 -12
  165. data/spec/lib/validators/array_validator_spec.rb +1 -1
  166. data/spec/spec_helper.rb +10 -32
  167. data/spec/support/custom_bool_validator.rb +17 -0
  168. data/spec/{controllers → test_engine}/memes_controller_spec.rb +1 -1
  169. metadata +173 -125
  170. data/.travis.yml +0 -41
  171. data/Gemfile +0 -1
  172. data/Gemfile.rails41 +0 -7
  173. data/Gemfile.rails42 +0 -14
  174. data/Gemfile.rails50 +0 -9
  175. data/Gemfile.rails51 +0 -9
  176. data/Gemfile.rails60 +0 -10
  177. data/Gemfile.rails61 +0 -10
  178. data/spec/lib/application_spec.rb +0 -49
  179. data/spec/lib/method_description_spec.rb +0 -98
  180. data/spec/lib/resource_description_spec.rb +0 -48
  181. /data/spec/lib/{extractor → apipie/extractor/recorder}/middleware_spec.rb +0 -0
metadata CHANGED
@@ -1,30 +1,86 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apipie-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.19
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pokorny
8
8
  - Ivan Necas
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-25 00:00:00.000000000 Z
12
+ date: 2023-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rails
15
+ name: actionpack
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '4.1'
20
+ version: '5.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '4.1'
27
+ version: '5.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: activesupport
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '5.0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '5.0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: maruku
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: RedCloth
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: json-schema
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '2.8'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '2.8'
28
84
  - !ruby/object:Gem::Dependency
29
85
  name: rspec-rails
30
86
  requirement: !ruby/object:Gem::Requirement
@@ -40,7 +96,7 @@ dependencies:
40
96
  - !ruby/object:Gem::Version
41
97
  version: '3.0'
42
98
  - !ruby/object:Gem::Dependency
43
- name: sqlite3
99
+ name: rake
44
100
  requirement: !ruby/object:Gem::Requirement
45
101
  requirements:
46
102
  - - ">="
@@ -54,7 +110,7 @@ dependencies:
54
110
  - !ruby/object:Gem::Version
55
111
  version: '0'
56
112
  - !ruby/object:Gem::Dependency
57
- name: minitest
113
+ name: rubocop_challenger
58
114
  requirement: !ruby/object:Gem::Requirement
59
115
  requirements:
60
116
  - - ">="
@@ -68,7 +124,7 @@ dependencies:
68
124
  - !ruby/object:Gem::Version
69
125
  version: '0'
70
126
  - !ruby/object:Gem::Dependency
71
- name: maruku
127
+ name: rubocop-rails
72
128
  requirement: !ruby/object:Gem::Requirement
73
129
  requirements:
74
130
  - - ">="
@@ -82,7 +138,7 @@ dependencies:
82
138
  - !ruby/object:Gem::Version
83
139
  version: '0'
84
140
  - !ruby/object:Gem::Dependency
85
- name: RedCloth
141
+ name: rubocop-rspec
86
142
  requirement: !ruby/object:Gem::Requirement
87
143
  requirements:
88
144
  - - ">="
@@ -96,7 +152,7 @@ dependencies:
96
152
  - !ruby/object:Gem::Version
97
153
  version: '0'
98
154
  - !ruby/object:Gem::Dependency
99
- name: rake
155
+ name: rubocop-performance
100
156
  requirement: !ruby/object:Gem::Requirement
101
157
  requirements:
102
158
  - - ">="
@@ -110,7 +166,7 @@ dependencies:
110
166
  - !ruby/object:Gem::Version
111
167
  version: '0'
112
168
  - !ruby/object:Gem::Dependency
113
- name: rdoc
169
+ name: simplecov
114
170
  requirement: !ruby/object:Gem::Requirement
115
171
  requirements:
116
172
  - - ">="
@@ -124,19 +180,19 @@ dependencies:
124
180
  - !ruby/object:Gem::Version
125
181
  version: '0'
126
182
  - !ruby/object:Gem::Dependency
127
- name: json-schema
183
+ name: sqlite3
128
184
  requirement: !ruby/object:Gem::Requirement
129
185
  requirements:
130
- - - "~>"
186
+ - - ">="
131
187
  - !ruby/object:Gem::Version
132
- version: '2.8'
188
+ version: '0'
133
189
  type: :development
134
190
  prerelease: false
135
191
  version_requirements: !ruby/object:Gem::Requirement
136
192
  requirements:
137
- - - "~>"
193
+ - - ">="
138
194
  - !ruby/object:Gem::Version
139
- version: '2.8'
195
+ version: '0'
140
196
  description: Rails REST API documentation tool
141
197
  email:
142
198
  - pajkycz@gmail.com
@@ -145,18 +201,17 @@ executables: []
145
201
  extensions: []
146
202
  extra_rdoc_files: []
147
203
  files:
204
+ - ".github/workflows/build.yml"
205
+ - ".github/workflows/rubocop-challenger.yml"
206
+ - ".github/workflows/rubocop.yml"
148
207
  - ".gitignore"
149
208
  - ".rspec"
150
- - ".travis.yml"
209
+ - ".rubocop.yml"
210
+ - ".rubocop_todo.yml"
211
+ - ".vscode/settings.json"
151
212
  - APACHE-LICENSE-2.0
152
213
  - CHANGELOG.md
153
214
  - Gemfile
154
- - Gemfile.rails41
155
- - Gemfile.rails42
156
- - Gemfile.rails50
157
- - Gemfile.rails51
158
- - Gemfile.rails60
159
- - Gemfile.rails61
160
215
  - MIT-LICENSE
161
216
  - NOTICE
162
217
  - PROPOSAL_FOR_RESPONSE_DESCRIPTIONS.md
@@ -174,6 +229,7 @@ files:
174
229
  - app/public/apipie/stylesheets/bundled/bootstrap-responsive.min.css
175
230
  - app/public/apipie/stylesheets/bundled/bootstrap.min.css
176
231
  - app/public/apipie/stylesheets/bundled/prettify.css
232
+ - app/views/apipie/apipies/_deprecation.html.erb
177
233
  - app/views/apipie/apipies/_disqus.html.erb
178
234
  - app/views/apipie/apipies/_errors.html.erb
179
235
  - app/views/apipie/apipies/_headers.html.erb
@@ -197,12 +253,14 @@ files:
197
253
  - config/locales/fr.yml
198
254
  - config/locales/it.yml
199
255
  - config/locales/ja.yml
256
+ - config/locales/ko.yml
200
257
  - config/locales/pl.yml
201
258
  - config/locales/pt-BR.yml
202
259
  - config/locales/ru.yml
203
260
  - config/locales/tr.yml
204
261
  - config/locales/zh-CN.yml
205
262
  - config/locales/zh-TW.yml
263
+ - gemfiles/Gemfile.tools
206
264
  - images/screenshot-1.png
207
265
  - images/screenshot-2.png
208
266
  - lib/apipie-rails.rb
@@ -217,11 +275,46 @@ files:
217
275
  - lib/apipie/extractor/collector.rb
218
276
  - lib/apipie/extractor/recorder.rb
219
277
  - lib/apipie/extractor/writer.rb
278
+ - lib/apipie/generator/config.rb
279
+ - lib/apipie/generator/generator.rb
280
+ - lib/apipie/generator/swagger/computed_interface_id.rb
281
+ - lib/apipie/generator/swagger/config.rb
282
+ - lib/apipie/generator/swagger/context.rb
283
+ - lib/apipie/generator/swagger/method_description.rb
284
+ - lib/apipie/generator/swagger/method_description/api_decorator.rb
285
+ - lib/apipie/generator/swagger/method_description/api_schema_service.rb
286
+ - lib/apipie/generator/swagger/method_description/decorator.rb
287
+ - lib/apipie/generator/swagger/method_description/parameters_service.rb
288
+ - lib/apipie/generator/swagger/method_description/response_schema_service.rb
289
+ - lib/apipie/generator/swagger/method_description/response_service.rb
290
+ - lib/apipie/generator/swagger/operation_id.rb
291
+ - lib/apipie/generator/swagger/param_description.rb
292
+ - lib/apipie/generator/swagger/param_description/builder.rb
293
+ - lib/apipie/generator/swagger/param_description/composite.rb
294
+ - lib/apipie/generator/swagger/param_description/description.rb
295
+ - lib/apipie/generator/swagger/param_description/in.rb
296
+ - lib/apipie/generator/swagger/param_description/name.rb
297
+ - lib/apipie/generator/swagger/param_description/path_params_composite.rb
298
+ - lib/apipie/generator/swagger/param_description/referenced_composite.rb
299
+ - lib/apipie/generator/swagger/param_description/type.rb
300
+ - lib/apipie/generator/swagger/path_decorator.rb
301
+ - lib/apipie/generator/swagger/referenced_definitions.rb
302
+ - lib/apipie/generator/swagger/resource_description_collection.rb
303
+ - lib/apipie/generator/swagger/resource_description_composite.rb
304
+ - lib/apipie/generator/swagger/schema.rb
305
+ - lib/apipie/generator/swagger/swagger.rb
306
+ - lib/apipie/generator/swagger/type.rb
307
+ - lib/apipie/generator/swagger/type_extractor.rb
308
+ - lib/apipie/generator/swagger/warning.rb
309
+ - lib/apipie/generator/swagger/warning_writer.rb
220
310
  - lib/apipie/helpers.rb
221
311
  - lib/apipie/markup.rb
222
312
  - lib/apipie/method_description.rb
313
+ - lib/apipie/method_description/api.rb
314
+ - lib/apipie/method_description/apis_service.rb
223
315
  - lib/apipie/middleware/checksum_in_headers.rb
224
316
  - lib/apipie/param_description.rb
317
+ - lib/apipie/param_description/deprecation.rb
225
318
  - lib/apipie/railtie.rb
226
319
  - lib/apipie/resource_description.rb
227
320
  - lib/apipie/response_description.rb
@@ -246,11 +339,13 @@ files:
246
339
  - rel-eng/tito.props
247
340
  - spec/controllers/api/v1/architectures_controller_spec.rb
248
341
  - spec/controllers/api/v2/architectures_controller_spec.rb
342
+ - spec/controllers/api/v2/empty_middle_controller_spec.rb
249
343
  - spec/controllers/api/v2/nested/resources_controller_spec.rb
250
- - spec/controllers/apipies_controller_spec.rb
344
+ - spec/controllers/api/v2/sub/footguns_controller_spec.rb
251
345
  - spec/controllers/concerns_controller_spec.rb
252
346
  - spec/controllers/extended_controller_spec.rb
253
- - spec/controllers/memes_controller_spec.rb
347
+ - spec/controllers/included_param_group_controller_spec.rb
348
+ - spec/controllers/pets_controller_spec.rb
254
349
  - spec/controllers/users_controller_spec.rb
255
350
  - spec/dummy/Rakefile
256
351
  - spec/dummy/app/controllers/api/base_controller.rb
@@ -258,22 +353,26 @@ files:
258
353
  - spec/dummy/app/controllers/api/v1/base_controller.rb
259
354
  - spec/dummy/app/controllers/api/v2/architectures_controller.rb
260
355
  - spec/dummy/app/controllers/api/v2/base_controller.rb
356
+ - spec/dummy/app/controllers/api/v2/empty_middle_controller.rb
261
357
  - spec/dummy/app/controllers/api/v2/nested/architectures_controller.rb
262
358
  - spec/dummy/app/controllers/api/v2/nested/resources_controller.rb
359
+ - spec/dummy/app/controllers/api/v2/sub/footguns_controller.rb
263
360
  - spec/dummy/app/controllers/application_controller.rb
264
- - spec/dummy/app/controllers/concerns/extending_concern.rb
265
- - spec/dummy/app/controllers/concerns/sample_controller.rb
266
361
  - spec/dummy/app/controllers/concerns_controller.rb
267
362
  - spec/dummy/app/controllers/extended_controller.rb
363
+ - spec/dummy/app/controllers/extending_concern.rb
268
364
  - spec/dummy/app/controllers/files_controller.rb
365
+ - spec/dummy/app/controllers/included_param_group_controller.rb
269
366
  - spec/dummy/app/controllers/overridden_concerns_controller.rb
270
367
  - spec/dummy/app/controllers/pets_controller.rb
271
368
  - spec/dummy/app/controllers/pets_using_auto_views_controller.rb
272
369
  - spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb
370
+ - spec/dummy/app/controllers/sample_controller.rb
273
371
  - spec/dummy/app/controllers/tagged_cats_controller.rb
274
372
  - spec/dummy/app/controllers/tagged_dogs_controller.rb
275
373
  - spec/dummy/app/controllers/twitter_example_controller.rb
276
374
  - spec/dummy/app/controllers/users_controller.rb
375
+ - spec/dummy/app/helpers/random_param_group.rb
277
376
  - spec/dummy/app/views/layouts/application.html.erb
278
377
  - spec/dummy/components/test_engine/Gemfile
279
378
  - spec/dummy/components/test_engine/app/controllers/test_engine/application_controller.rb
@@ -307,28 +406,58 @@ files:
307
406
  - spec/dummy/public/favicon.ico
308
407
  - spec/dummy/public/stylesheets/.gitkeep
309
408
  - spec/dummy/script/rails
310
- - spec/lib/application_spec.rb
311
- - spec/lib/extractor/extractor_spec.rb
312
- - spec/lib/extractor/middleware_spec.rb
313
- - spec/lib/extractor/writer_spec.rb
314
- - spec/lib/file_handler_spec.rb
315
- - spec/lib/method_description_spec.rb
316
- - spec/lib/param_description_spec.rb
317
- - spec/lib/param_group_spec.rb
409
+ - spec/lib/apipie/apipies_controller_spec.rb
410
+ - spec/lib/apipie/application_spec.rb
411
+ - spec/lib/apipie/configuration_spec.rb
412
+ - spec/lib/apipie/extractor/collector_spec.rb
413
+ - spec/lib/apipie/extractor/recorder/middleware_spec.rb
414
+ - spec/lib/apipie/extractor/recorder_spec.rb
415
+ - spec/lib/apipie/extractor/writer_spec.rb
416
+ - spec/lib/apipie/extractor_spec.rb
417
+ - spec/lib/apipie/file_handler_spec.rb
418
+ - spec/lib/apipie/generator/swagger/config_spec.rb
419
+ - spec/lib/apipie/generator/swagger/context_spec.rb
420
+ - spec/lib/apipie/generator/swagger/method_description/api_schema_service_spec.rb
421
+ - spec/lib/apipie/generator/swagger/method_description/response_schema_service_spec.rb
422
+ - spec/lib/apipie/generator/swagger/operation_id_spec.rb
423
+ - spec/lib/apipie/generator/swagger/param_description/builder_spec.rb
424
+ - spec/lib/apipie/generator/swagger/param_description/composite_spec.rb
425
+ - spec/lib/apipie/generator/swagger/param_description/description_spec.rb
426
+ - spec/lib/apipie/generator/swagger/param_description/in_spec.rb
427
+ - spec/lib/apipie/generator/swagger/param_description/name_spec.rb
428
+ - spec/lib/apipie/generator/swagger/param_description/type_spec.rb
429
+ - spec/lib/apipie/generator/swagger/param_description_spec.rb
430
+ - spec/lib/apipie/generator/swagger/path_decorator_spec.rb
431
+ - spec/lib/apipie/generator/swagger/referenced_definitions_spec.rb
432
+ - spec/lib/apipie/generator/swagger/resource_description_composite_spec.rb
433
+ - spec/lib/apipie/generator/swagger/resource_descriptions_collection_spec.rb
434
+ - spec/lib/apipie/generator/swagger/schema_spec.rb
435
+ - spec/lib/apipie/generator/swagger/type_extractor_spec.rb
436
+ - spec/lib/apipie/generator/swagger/warning_spec.rb
437
+ - spec/lib/apipie/generator/swagger/warning_writer_spec.rb
438
+ - spec/lib/apipie/method_description/apis_service_spec.rb
439
+ - spec/lib/apipie/method_description_spec.rb
440
+ - spec/lib/apipie/no_documented_method_spec.rb
441
+ - spec/lib/apipie/param_description/deprecation_spec.rb
442
+ - spec/lib/apipie/param_description_spec.rb
443
+ - spec/lib/apipie/param_group_spec.rb
444
+ - spec/lib/apipie/resource_description_spec.rb
445
+ - spec/lib/apipie/response_does_not_match_swagger_schema_spec.rb
446
+ - spec/lib/apipie/swagger_generator_spec.rb
447
+ - spec/lib/apipie/validator_spec.rb
318
448
  - spec/lib/rake_spec.rb
319
- - spec/lib/resource_description_spec.rb
320
449
  - spec/lib/swagger/openapi_2_0_schema.json
321
450
  - spec/lib/swagger/rake_swagger_spec.rb
322
- - spec/lib/swagger/response_validation_spec.rb
323
451
  - spec/lib/swagger/swagger_dsl_spec.rb
324
- - spec/lib/validator_spec.rb
325
452
  - spec/lib/validators/array_validator_spec.rb
326
453
  - spec/spec_helper.rb
454
+ - spec/support/custom_bool_validator.rb
327
455
  - spec/support/rake.rb
456
+ - spec/test_engine/memes_controller_spec.rb
328
457
  homepage: http://github.com/Apipie/apipie-rails
329
458
  licenses: []
330
459
  metadata: {}
331
- post_install_message:
460
+ post_install_message:
332
461
  rdoc_options: []
333
462
  require_paths:
334
463
  - lib
@@ -336,96 +465,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
336
465
  requirements:
337
466
  - - ">="
338
467
  - !ruby/object:Gem::Version
339
- version: 2.0.0
468
+ version: 2.6.0
340
469
  required_rubygems_version: !ruby/object:Gem::Requirement
341
470
  requirements:
342
471
  - - ">="
343
472
  - !ruby/object:Gem::Version
344
473
  version: '0'
345
474
  requirements: []
346
- rubygems_version: 3.1.2
347
- signing_key:
475
+ rubygems_version: 3.4.22
476
+ signing_key:
348
477
  specification_version: 4
349
478
  summary: Rails REST API documentation tool
350
- test_files:
351
- - spec/controllers/api/v1/architectures_controller_spec.rb
352
- - spec/controllers/api/v2/architectures_controller_spec.rb
353
- - spec/controllers/api/v2/nested/resources_controller_spec.rb
354
- - spec/controllers/apipies_controller_spec.rb
355
- - spec/controllers/concerns_controller_spec.rb
356
- - spec/controllers/extended_controller_spec.rb
357
- - spec/controllers/memes_controller_spec.rb
358
- - spec/controllers/users_controller_spec.rb
359
- - spec/dummy/Rakefile
360
- - spec/dummy/app/controllers/api/base_controller.rb
361
- - spec/dummy/app/controllers/api/v1/architectures_controller.rb
362
- - spec/dummy/app/controllers/api/v1/base_controller.rb
363
- - spec/dummy/app/controllers/api/v2/architectures_controller.rb
364
- - spec/dummy/app/controllers/api/v2/base_controller.rb
365
- - spec/dummy/app/controllers/api/v2/nested/architectures_controller.rb
366
- - spec/dummy/app/controllers/api/v2/nested/resources_controller.rb
367
- - spec/dummy/app/controllers/application_controller.rb
368
- - spec/dummy/app/controllers/concerns/extending_concern.rb
369
- - spec/dummy/app/controllers/concerns/sample_controller.rb
370
- - spec/dummy/app/controllers/concerns_controller.rb
371
- - spec/dummy/app/controllers/extended_controller.rb
372
- - spec/dummy/app/controllers/files_controller.rb
373
- - spec/dummy/app/controllers/overridden_concerns_controller.rb
374
- - spec/dummy/app/controllers/pets_controller.rb
375
- - spec/dummy/app/controllers/pets_using_auto_views_controller.rb
376
- - spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb
377
- - spec/dummy/app/controllers/tagged_cats_controller.rb
378
- - spec/dummy/app/controllers/tagged_dogs_controller.rb
379
- - spec/dummy/app/controllers/twitter_example_controller.rb
380
- - spec/dummy/app/controllers/users_controller.rb
381
- - spec/dummy/app/views/layouts/application.html.erb
382
- - spec/dummy/components/test_engine/Gemfile
383
- - spec/dummy/components/test_engine/app/controllers/test_engine/application_controller.rb
384
- - spec/dummy/components/test_engine/app/controllers/test_engine/memes_controller.rb
385
- - spec/dummy/components/test_engine/config/routes.rb
386
- - spec/dummy/components/test_engine/db/.gitkeep
387
- - spec/dummy/components/test_engine/lib/test_engine.rb
388
- - spec/dummy/components/test_engine/test_engine.gemspec
389
- - spec/dummy/config.ru
390
- - spec/dummy/config/application.rb
391
- - spec/dummy/config/boot.rb
392
- - spec/dummy/config/database.yml
393
- - spec/dummy/config/environment.rb
394
- - spec/dummy/config/environments/development.rb
395
- - spec/dummy/config/environments/production.rb
396
- - spec/dummy/config/environments/test.rb
397
- - spec/dummy/config/initializers/apipie.rb
398
- - spec/dummy/config/initializers/backtrace_silencers.rb
399
- - spec/dummy/config/initializers/inflections.rb
400
- - spec/dummy/config/initializers/mime_types.rb
401
- - spec/dummy/config/initializers/secret_token.rb
402
- - spec/dummy/config/initializers/session_store.rb
403
- - spec/dummy/config/locales/en.yml
404
- - spec/dummy/config/routes.rb
405
- - spec/dummy/db/.gitkeep
406
- - spec/dummy/doc/apipie_examples.json
407
- - spec/dummy/doc/users/desc_from_file.md
408
- - spec/dummy/public/404.html
409
- - spec/dummy/public/422.html
410
- - spec/dummy/public/500.html
411
- - spec/dummy/public/favicon.ico
412
- - spec/dummy/public/stylesheets/.gitkeep
413
- - spec/dummy/script/rails
414
- - spec/lib/application_spec.rb
415
- - spec/lib/extractor/extractor_spec.rb
416
- - spec/lib/extractor/middleware_spec.rb
417
- - spec/lib/extractor/writer_spec.rb
418
- - spec/lib/file_handler_spec.rb
419
- - spec/lib/method_description_spec.rb
420
- - spec/lib/param_description_spec.rb
421
- - spec/lib/param_group_spec.rb
422
- - spec/lib/rake_spec.rb
423
- - spec/lib/resource_description_spec.rb
424
- - spec/lib/swagger/openapi_2_0_schema.json
425
- - spec/lib/swagger/rake_swagger_spec.rb
426
- - spec/lib/swagger/response_validation_spec.rb
427
- - spec/lib/swagger/swagger_dsl_spec.rb
428
- - spec/lib/validator_spec.rb
429
- - spec/lib/validators/array_validator_spec.rb
430
- - spec/spec_helper.rb
431
- - spec/support/rake.rb
479
+ test_files: []
data/.travis.yml DELETED
@@ -1,41 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- before_install: >-
4
- if ruby -v | grep 'ruby 2.2'; then
5
- gem install bundler -v '~> 1.17'
6
- fi
7
- rvm:
8
- - 2.2.10
9
- - 2.3.8
10
- - 2.4.5
11
- - 2.5.3
12
- - 2.6.5
13
- - 2.7.0
14
- gemfile:
15
- - Gemfile.rails42
16
- - Gemfile.rails51 # Min ruby 2.2.2
17
- - Gemfile.rails60 # Min ruby 2.5.0
18
- - Gemfile.rails61 # Min ruby 2.5.0
19
-
20
- matrix:
21
- exclude:
22
- - rvm: 2.5.3
23
- gemfile: Gemfile.rails42
24
- - rvm: 2.6.5
25
- gemfile: Gemfile.rails42
26
- - rvm: 2.7.0
27
- gemfile: Gemfile.rails42
28
- - rvm: 2.7.0
29
- gemfile: Gemfile.rails51
30
- - rvm: 2.2.10
31
- gemfile: Gemfile.rails60
32
- - rvm: 2.3.8
33
- gemfile: Gemfile.rails60
34
- - rvm: 2.4.5
35
- gemfile: Gemfile.rails60
36
- - rvm: 2.2.10
37
- gemfile: Gemfile.rails61
38
- - rvm: 2.3.8
39
- gemfile: Gemfile.rails61
40
- - rvm: 2.4.5
41
- gemfile: Gemfile.rails61
data/Gemfile DELETED
@@ -1 +0,0 @@
1
- ./Gemfile.rails61
data/Gemfile.rails41 DELETED
@@ -1,7 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 4.1.0'
6
- gem 'mime-types', '~> 2.99.3'
7
- gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test
data/Gemfile.rails42 DELETED
@@ -1,14 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 4.2.5'
6
- gem 'mime-types', '~> 2.99.3'
7
- gem 'sqlite3', '~> 1.3.6'
8
-
9
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.1.0')
10
- gem 'nokogiri', '~> 1.6.8'
11
- gem 'rdoc', '~> 4.2.2'
12
- end
13
-
14
- gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test
data/Gemfile.rails50 DELETED
@@ -1,9 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 5.0.0'
6
- gem 'mime-types', '~> 2.99.3'
7
- gem 'rails-controller-testing'
8
-
9
- gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test
data/Gemfile.rails51 DELETED
@@ -1,9 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 5.1.0.rc1'
6
- gem 'mime-types', '~> 2.99.3'
7
- gem 'rails-controller-testing'
8
-
9
- gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test
data/Gemfile.rails60 DELETED
@@ -1,10 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 6.0.2'
6
- gem 'mime-types', '~> 2.99.3'
7
- gem 'rails-controller-testing'
8
- gem 'rspec-rails', '4.0.0.beta3'
9
-
10
- gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test
data/Gemfile.rails61 DELETED
@@ -1,10 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 6.1.1'
6
- gem 'mime-types', '~> 2.99.3'
7
- gem 'rails-controller-testing'
8
- gem 'rspec-rails', '~> 4.0.2'
9
-
10
- gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test
@@ -1,49 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe Apipie::Application do
4
-
5
- describe "api_controllers_paths" do
6
- before { Apipie.configuration.api_controllers_matcher = [File.join(Rails.root, "app", "controllers", "**","*.rb"), File.join(Rails.root, "lib", "**","*.rb")] }
7
-
8
- it "should support receiving array as parameter" do
9
- expect { Apipie.api_controllers_paths}.
10
- not_to raise_error
11
- end
12
-
13
-
14
- end
15
-
16
- describe "get_resource_name" do
17
- subject {Apipie.get_resource_name(Api::V2::Nested::ArchitecturesController)}
18
-
19
- context "with namespaced_resources enabled" do
20
- before { Apipie.configuration.namespaced_resources = true }
21
- context "with a defined base url" do
22
-
23
- it "should not overwrite the parent resource" do
24
- is_expected.not_to eq(Apipie.get_resource_name(Api::V2::ArchitecturesController))
25
- end
26
-
27
- end
28
-
29
- context "with an undefined base url" do
30
- before {allow(Apipie.app).to receive(:get_base_url) { nil }}
31
-
32
- it "should not raise an error" do
33
- expect { Apipie.get_resource_name(Api::V2::ArchitecturesController) }.
34
- not_to raise_error
35
- end
36
- end
37
-
38
- after { Apipie.configuration.namespaced_resources = false }
39
- end
40
-
41
- context "with namespaced_resources enabled" do
42
- before { Apipie.configuration.namespaced_resources = false }
43
-
44
- it "should overwrite the the parent" do
45
- is_expected.to eq(Apipie.get_resource_name(Api::V2::ArchitecturesController))
46
- end
47
- end
48
- end
49
- end