grape-swagger 1.6.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -1
  3. data/README.md +1 -0
  4. data/grape-swagger.gemspec +5 -5
  5. data/lib/grape-swagger/doc_methods/extensions.rb +2 -1
  6. data/lib/grape-swagger/doc_methods/move_params.rb +1 -0
  7. data/lib/grape-swagger/endpoint.rb +1 -1
  8. data/lib/grape-swagger/version.rb +1 -1
  9. metadata +26 -129
  10. data/.coveralls.yml +0 -1
  11. data/.github/dependabot.yml +0 -20
  12. data/.github/workflows/ci.yml +0 -120
  13. data/.gitignore +0 -45
  14. data/.rspec +0 -3
  15. data/.rubocop.yml +0 -136
  16. data/.rubocop_todo.yml +0 -45
  17. data/Dangerfile +0 -3
  18. data/Gemfile +0 -43
  19. data/Rakefile +0 -20
  20. data/example/api/endpoints.rb +0 -131
  21. data/example/api/entities.rb +0 -18
  22. data/example/config.ru +0 -42
  23. data/example/example_requests.postman_collection +0 -146
  24. data/example/splines.png +0 -0
  25. data/example/swagger-example.png +0 -0
  26. data/spec/issues/267_nested_namespaces.rb +0 -55
  27. data/spec/issues/403_versions_spec.rb +0 -124
  28. data/spec/issues/427_entity_as_string_spec.rb +0 -39
  29. data/spec/issues/430_entity_definitions_spec.rb +0 -94
  30. data/spec/issues/532_allow_custom_format_spec.rb +0 -38
  31. data/spec/issues/533_specify_status_code_spec.rb +0 -78
  32. data/spec/issues/537_enum_values_spec.rb +0 -50
  33. data/spec/issues/539_array_post_body_spec.rb +0 -65
  34. data/spec/issues/542_array_of_type_in_post_body_spec.rb +0 -46
  35. data/spec/issues/553_align_array_put_post_params_spec.rb +0 -144
  36. data/spec/issues/572_array_post_body_spec.rb +0 -51
  37. data/spec/issues/579_align_put_post_parameters_spec.rb +0 -179
  38. data/spec/issues/582_file_response_spec.rb +0 -55
  39. data/spec/issues/587_range_parameter_delimited_by_dash_spec.rb +0 -26
  40. data/spec/issues/605_root_route_documentation_spec.rb +0 -23
  41. data/spec/issues/650_params_array_spec.rb +0 -59
  42. data/spec/issues/677_consumes_produces_add_swagger_documentation_options_spec.rb +0 -100
  43. data/spec/issues/680_keep_204_error_schemas_spec.rb +0 -55
  44. data/spec/issues/751_deeply_nested_objects_spec.rb +0 -190
  45. data/spec/issues/776_multiple_presents_spec.rb +0 -59
  46. data/spec/issues/784_extensions_on_params_spec.rb +0 -38
  47. data/spec/issues/809_utf8_routes_spec.rb +0 -55
  48. data/spec/issues/832_array_hash_float_decimal_spec.rb +0 -111
  49. data/spec/issues/847_route_param_options_spec.rb +0 -37
  50. data/spec/lib/data_type_spec.rb +0 -111
  51. data/spec/lib/endpoint/params_parser_spec.rb +0 -124
  52. data/spec/lib/endpoint_spec.rb +0 -153
  53. data/spec/lib/extensions_spec.rb +0 -185
  54. data/spec/lib/format_data_spec.rb +0 -115
  55. data/spec/lib/model_parsers_spec.rb +0 -104
  56. data/spec/lib/move_params_spec.rb +0 -444
  57. data/spec/lib/oapi_tasks_spec.rb +0 -163
  58. data/spec/lib/operation_id_spec.rb +0 -55
  59. data/spec/lib/optional_object_spec.rb +0 -47
  60. data/spec/lib/parse_params_spec.rb +0 -82
  61. data/spec/lib/path_string_spec.rb +0 -101
  62. data/spec/lib/produces_consumes_spec.rb +0 -116
  63. data/spec/lib/tag_name_description_spec.rb +0 -80
  64. data/spec/lib/version_spec.rb +0 -28
  65. data/spec/spec_helper.rb +0 -39
  66. data/spec/support/empty_model_parser.rb +0 -23
  67. data/spec/support/grape_version.rb +0 -13
  68. data/spec/support/mock_parser.rb +0 -23
  69. data/spec/support/model_parsers/entity_parser.rb +0 -334
  70. data/spec/support/model_parsers/mock_parser.rb +0 -346
  71. data/spec/support/model_parsers/representable_parser.rb +0 -406
  72. data/spec/support/namespace_tags.rb +0 -93
  73. data/spec/support/the_paths_definitions.rb +0 -109
  74. data/spec/swagger_v2/api_documentation_spec.rb +0 -26
  75. data/spec/swagger_v2/api_swagger_v2_additional_properties_spec.rb +0 -83
  76. data/spec/swagger_v2/api_swagger_v2_body_definitions_spec.rb +0 -48
  77. data/spec/swagger_v2/api_swagger_v2_definitions-models_spec.rb +0 -36
  78. data/spec/swagger_v2/api_swagger_v2_detail_spec.rb +0 -79
  79. data/spec/swagger_v2/api_swagger_v2_extensions_spec.rb +0 -145
  80. data/spec/swagger_v2/api_swagger_v2_format-content_type_spec.rb +0 -137
  81. data/spec/swagger_v2/api_swagger_v2_global_configuration_spec.rb +0 -56
  82. data/spec/swagger_v2/api_swagger_v2_hash_and_array_spec.rb +0 -64
  83. data/spec/swagger_v2/api_swagger_v2_headers_spec.rb +0 -58
  84. data/spec/swagger_v2/api_swagger_v2_hide_documentation_path_spec.rb +0 -57
  85. data/spec/swagger_v2/api_swagger_v2_hide_param_spec.rb +0 -103
  86. data/spec/swagger_v2/api_swagger_v2_ignore_defaults_spec.rb +0 -48
  87. data/spec/swagger_v2/api_swagger_v2_mounted_spec.rb +0 -145
  88. data/spec/swagger_v2/api_swagger_v2_param_type_body_nested_spec.rb +0 -355
  89. data/spec/swagger_v2/api_swagger_v2_param_type_body_spec.rb +0 -217
  90. data/spec/swagger_v2/api_swagger_v2_param_type_spec.rb +0 -239
  91. data/spec/swagger_v2/api_swagger_v2_request_params_fix_spec.rb +0 -72
  92. data/spec/swagger_v2/api_swagger_v2_response_spec.rb +0 -143
  93. data/spec/swagger_v2/api_swagger_v2_response_with_examples_spec.rb +0 -135
  94. data/spec/swagger_v2/api_swagger_v2_response_with_headers_spec.rb +0 -216
  95. data/spec/swagger_v2/api_swagger_v2_response_with_models_spec.rb +0 -55
  96. data/spec/swagger_v2/api_swagger_v2_response_with_root_spec.rb +0 -153
  97. data/spec/swagger_v2/api_swagger_v2_spec.rb +0 -237
  98. data/spec/swagger_v2/api_swagger_v2_status_codes_spec.rb +0 -93
  99. data/spec/swagger_v2/api_swagger_v2_type-format_spec.rb +0 -89
  100. data/spec/swagger_v2/boolean_params_spec.rb +0 -35
  101. data/spec/swagger_v2/default_api_spec.rb +0 -175
  102. data/spec/swagger_v2/deprecated_field_spec.rb +0 -25
  103. data/spec/swagger_v2/description_not_initialized_spec.rb +0 -39
  104. data/spec/swagger_v2/endpoint_versioned_path_spec.rb +0 -130
  105. data/spec/swagger_v2/errors_spec.rb +0 -77
  106. data/spec/swagger_v2/float_api_spec.rb +0 -33
  107. data/spec/swagger_v2/form_params_spec.rb +0 -67
  108. data/spec/swagger_v2/grape-swagger_spec.rb +0 -17
  109. data/spec/swagger_v2/guarded_endpoint_spec.rb +0 -162
  110. data/spec/swagger_v2/hide_api_spec.rb +0 -147
  111. data/spec/swagger_v2/host_spec.rb +0 -43
  112. data/spec/swagger_v2/inheritance_and_discriminator_spec.rb +0 -57
  113. data/spec/swagger_v2/mount_override_api_spec.rb +0 -58
  114. data/spec/swagger_v2/mounted_target_class_spec.rb +0 -76
  115. data/spec/swagger_v2/namespace_tags_prefix_spec.rb +0 -122
  116. data/spec/swagger_v2/namespace_tags_spec.rb +0 -78
  117. data/spec/swagger_v2/namespaced_api_spec.rb +0 -121
  118. data/spec/swagger_v2/nicknamed_api_spec.rb +0 -25
  119. data/spec/swagger_v2/operation_id_api_spec.rb +0 -27
  120. data/spec/swagger_v2/param_multi_type_spec.rb +0 -77
  121. data/spec/swagger_v2/param_type_spec.rb +0 -87
  122. data/spec/swagger_v2/param_values_spec.rb +0 -162
  123. data/spec/swagger_v2/params_array_collection_format_spec.rb +0 -105
  124. data/spec/swagger_v2/params_array_spec.rb +0 -203
  125. data/spec/swagger_v2/params_example_spec.rb +0 -40
  126. data/spec/swagger_v2/params_hash_spec.rb +0 -71
  127. data/spec/swagger_v2/params_nested_spec.rb +0 -86
  128. data/spec/swagger_v2/parent_less_namespace_spec.rb +0 -32
  129. data/spec/swagger_v2/reference_entity_spec.rb +0 -129
  130. data/spec/swagger_v2/security_requirement_spec.rb +0 -46
  131. data/spec/swagger_v2/simple_mounted_api_spec.rb +0 -326
  132. data/spec/version_spec.rb +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 994c2be4c9a0a44106876c31785adc73458d67c669ac80db7352e831511b8b2d
4
- data.tar.gz: ae834e4ab3533e107eec6f74763a3679da626fd1fffe0334fe9546b54b6f12e5
3
+ metadata.gz: '019fb3e92a8ab175f13ce61d4a04098afc821ad9c085c64685de5effb5ad02ee'
4
+ data.tar.gz: f2ffcf39c19988d5c04320800f8032e5bc3974b4d382e5c1a4b4ef76ceb1fcf3
5
5
  SHA512:
6
- metadata.gz: a8a3cafba1066fef61afcc744f9fc39f7aa607765a772cc071e4ac6d931c61a7810b6876bf2c35ba1722ce20b939e19a512983f4e185bae473c09486b06d4c8a
7
- data.tar.gz: cc5f17f8c99c2abccc49bf1da169134dcfdbf249d5f039c10eb00ab8d373cd03a29afc1c46534a296d8b4fc4d2b82eae969561bf64ca47abd7405e67c26ee6fa
6
+ metadata.gz: 2bcbba86e30b0831543a9ddd7d1a2b09eca52ffc7d0eac61488e8bdaaefb87fc7c641f3526fe8234a0e95434f981119a90ca3c19a4268b9021fc5612548b273e
7
+ data.tar.gz: 8dd8cc51b30feba0f79b985e03e2068bcd82819199415f316a292f38955ea26184c5c48848ccf613af8622d8ca7364efc9e59ab410628bfed2eb60ccbd4abba9
data/CHANGELOG.md CHANGED
@@ -9,6 +9,17 @@
9
9
  * Your contribution here.
10
10
 
11
11
 
12
+ ### 2.0.0 (November7, 2023)
13
+
14
+ #### Features
15
+
16
+ * [#910](https://github.com/ruby-grape/grape-swagger/pull/910): Allow using Grape v2 - [@ninoseki](https://github.com/ninoseki)
17
+
18
+ #### Fixes
19
+
20
+ * [#903](https://github.com/ruby-grape/grape-swagger/pull/903): Accept `example` documentation parameter for arrays - [@VladMomotov](https://github.com/VladMomotov)
21
+
22
+
12
23
  ### 1.6.1 (May 21, 2023)
13
24
 
14
25
  #### Fixes
@@ -54,7 +65,6 @@
54
65
  * [#853](https://github.com/ruby-grape/grape-swagger/pull/853): Add webrick gem so that example works in Ruby 3.x - [@takahashim](https://github.com/takahashim)
55
66
  * [#844](https://github.com/ruby-grape/grape-swagger/pull/844): Fixes the regexp used for parsing routes - [@senhalil](https://github.com/senhalil)
56
67
  * [#862](https://github.com/ruby-grape/grape-swagger/pull/862): Allow using nicknames for body definitions - [@magni-](https://github.com/magni-)
57
- * Your contribution here.
58
68
 
59
69
  ### 1.4.2 (October 22, 2021)
60
70
 
data/README.md CHANGED
@@ -53,6 +53,7 @@ The following versions of grape, grape-entity and grape-swagger can currently be
53
53
  | 0.32.0 | 2.0 | >= 0.16.2 | >= 0.5.0 | >= 2.4.1 |
54
54
  | 0.34.0 | 2.0 | >= 0.16.2 ... < 1.3.0 | >= 0.5.0 | >= 2.4.1 |
55
55
  | >= 1.0.0 | 2.0 | >= 1.3.0 | >= 0.5.0 | >= 2.4.1 |
56
+ | >= 2.0.0 | 2.0 | >= 1.7.0 | >= 0.5.0 | >= 2.4.1 |
56
57
 
57
58
 
58
59
  ## Swagger-Spec <a name="swagger-spec"></a>
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- $LOAD_PATH.push File.expand_path('lib', __dir__)
4
- require 'grape-swagger/version'
3
+ require_relative 'lib/grape-swagger/version'
5
4
 
6
5
  Gem::Specification.new do |s|
7
6
  s.name = 'grape-swagger'
@@ -15,9 +14,10 @@ Gem::Specification.new do |s|
15
14
 
16
15
  s.metadata['rubygems_mfa_required'] = 'true'
17
16
 
18
- s.required_ruby_version = '>= 2.7'
19
- s.add_runtime_dependency 'grape', '~> 1.3'
17
+ s.required_ruby_version = '>= 3.1'
18
+ s.add_runtime_dependency 'grape', '>= 1.7', '< 3.0'
19
+ s.add_runtime_dependency 'rack-test', '~> 2'
20
20
 
21
- s.files = `git ls-files`.split("\n")
21
+ s.files = Dir['lib/**/*', '*.md', 'LICENSE.txt', 'grape-swagger.gemspec']
22
22
  s.require_paths = ['lib']
23
23
  end
@@ -56,7 +56,8 @@ module GrapeSwagger
56
56
  return if response.nil?
57
57
 
58
58
  return response[:schema]['$ref'].split('/').last if response[:schema].key?('$ref')
59
- return response[:schema]['items']['$ref'].split('/').last if response[:schema].key?('items')
59
+
60
+ response[:schema]['items']['$ref'].split('/').last if response[:schema].key?('items')
60
61
  end
61
62
 
62
63
  def add_extension_to(part, extensions)
@@ -97,6 +97,7 @@ module GrapeSwagger
97
97
  {}.tap do |property|
98
98
  property[:type] = 'array'
99
99
  property[:description] = param.delete(:description) unless param[:description].nil?
100
+ property[:example] = param.delete(:example) unless param[:example].nil?
100
101
  property[:items] = document_as_property(param)[:items]
101
102
  end
102
103
  end
@@ -413,7 +413,7 @@ module Grape
413
413
  end
414
414
 
415
415
  def expose_params_from_model(model)
416
- model = model.is_a?(String) ? model.constantize : model
416
+ model = model.constantize if model.is_a?(String)
417
417
  model_name = model_name(model)
418
418
 
419
419
  return model_name if @definitions.key?(model_name)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GrapeSwagger
4
- VERSION = '1.6.1'
4
+ VERSION = '2.0.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-swagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LeFnord
@@ -9,22 +9,42 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-05-20 00:00:00.000000000 Z
12
+ date: 2023-11-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: grape
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '1.7'
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '3.0'
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ version: '1.7'
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
34
+ - !ruby/object:Gem::Dependency
35
+ name: rack-test
16
36
  requirement: !ruby/object:Gem::Requirement
17
37
  requirements:
18
38
  - - "~>"
19
39
  - !ruby/object:Gem::Version
20
- version: '1.3'
40
+ version: '2'
21
41
  type: :runtime
22
42
  prerelease: false
23
43
  version_requirements: !ruby/object:Gem::Requirement
24
44
  requirements:
25
45
  - - "~>"
26
46
  - !ruby/object:Gem::Version
27
- version: '1.3'
47
+ version: '2'
28
48
  description:
29
49
  email:
30
50
  - pscholz.le@gmail.com
@@ -33,28 +53,12 @@ executables: []
33
53
  extensions: []
34
54
  extra_rdoc_files: []
35
55
  files:
36
- - ".coveralls.yml"
37
- - ".github/dependabot.yml"
38
- - ".github/workflows/ci.yml"
39
- - ".gitignore"
40
- - ".rspec"
41
- - ".rubocop.yml"
42
- - ".rubocop_todo.yml"
43
56
  - CHANGELOG.md
44
57
  - CONTRIBUTING.md
45
- - Dangerfile
46
- - Gemfile
47
58
  - LICENSE.txt
48
59
  - README.md
49
60
  - RELEASING.md
50
- - Rakefile
51
61
  - UPGRADING.md
52
- - example/api/endpoints.rb
53
- - example/api/entities.rb
54
- - example/config.ru
55
- - example/example_requests.postman_collection
56
- - example/splines.png
57
- - example/swagger-example.png
58
62
  - grape-swagger.gemspec
59
63
  - lib/grape-swagger.rb
60
64
  - lib/grape-swagger/doc_methods.rb
@@ -79,113 +83,6 @@ files:
79
83
  - lib/grape-swagger/model_parsers.rb
80
84
  - lib/grape-swagger/rake/oapi_tasks.rb
81
85
  - lib/grape-swagger/version.rb
82
- - spec/issues/267_nested_namespaces.rb
83
- - spec/issues/403_versions_spec.rb
84
- - spec/issues/427_entity_as_string_spec.rb
85
- - spec/issues/430_entity_definitions_spec.rb
86
- - spec/issues/532_allow_custom_format_spec.rb
87
- - spec/issues/533_specify_status_code_spec.rb
88
- - spec/issues/537_enum_values_spec.rb
89
- - spec/issues/539_array_post_body_spec.rb
90
- - spec/issues/542_array_of_type_in_post_body_spec.rb
91
- - spec/issues/553_align_array_put_post_params_spec.rb
92
- - spec/issues/572_array_post_body_spec.rb
93
- - spec/issues/579_align_put_post_parameters_spec.rb
94
- - spec/issues/582_file_response_spec.rb
95
- - spec/issues/587_range_parameter_delimited_by_dash_spec.rb
96
- - spec/issues/605_root_route_documentation_spec.rb
97
- - spec/issues/650_params_array_spec.rb
98
- - spec/issues/677_consumes_produces_add_swagger_documentation_options_spec.rb
99
- - spec/issues/680_keep_204_error_schemas_spec.rb
100
- - spec/issues/751_deeply_nested_objects_spec.rb
101
- - spec/issues/776_multiple_presents_spec.rb
102
- - spec/issues/784_extensions_on_params_spec.rb
103
- - spec/issues/809_utf8_routes_spec.rb
104
- - spec/issues/832_array_hash_float_decimal_spec.rb
105
- - spec/issues/847_route_param_options_spec.rb
106
- - spec/lib/data_type_spec.rb
107
- - spec/lib/endpoint/params_parser_spec.rb
108
- - spec/lib/endpoint_spec.rb
109
- - spec/lib/extensions_spec.rb
110
- - spec/lib/format_data_spec.rb
111
- - spec/lib/model_parsers_spec.rb
112
- - spec/lib/move_params_spec.rb
113
- - spec/lib/oapi_tasks_spec.rb
114
- - spec/lib/operation_id_spec.rb
115
- - spec/lib/optional_object_spec.rb
116
- - spec/lib/parse_params_spec.rb
117
- - spec/lib/path_string_spec.rb
118
- - spec/lib/produces_consumes_spec.rb
119
- - spec/lib/tag_name_description_spec.rb
120
- - spec/lib/version_spec.rb
121
- - spec/spec_helper.rb
122
- - spec/support/empty_model_parser.rb
123
- - spec/support/grape_version.rb
124
- - spec/support/mock_parser.rb
125
- - spec/support/model_parsers/entity_parser.rb
126
- - spec/support/model_parsers/mock_parser.rb
127
- - spec/support/model_parsers/representable_parser.rb
128
- - spec/support/namespace_tags.rb
129
- - spec/support/the_paths_definitions.rb
130
- - spec/swagger_v2/api_documentation_spec.rb
131
- - spec/swagger_v2/api_swagger_v2_additional_properties_spec.rb
132
- - spec/swagger_v2/api_swagger_v2_body_definitions_spec.rb
133
- - spec/swagger_v2/api_swagger_v2_definitions-models_spec.rb
134
- - spec/swagger_v2/api_swagger_v2_detail_spec.rb
135
- - spec/swagger_v2/api_swagger_v2_extensions_spec.rb
136
- - spec/swagger_v2/api_swagger_v2_format-content_type_spec.rb
137
- - spec/swagger_v2/api_swagger_v2_global_configuration_spec.rb
138
- - spec/swagger_v2/api_swagger_v2_hash_and_array_spec.rb
139
- - spec/swagger_v2/api_swagger_v2_headers_spec.rb
140
- - spec/swagger_v2/api_swagger_v2_hide_documentation_path_spec.rb
141
- - spec/swagger_v2/api_swagger_v2_hide_param_spec.rb
142
- - spec/swagger_v2/api_swagger_v2_ignore_defaults_spec.rb
143
- - spec/swagger_v2/api_swagger_v2_mounted_spec.rb
144
- - spec/swagger_v2/api_swagger_v2_param_type_body_nested_spec.rb
145
- - spec/swagger_v2/api_swagger_v2_param_type_body_spec.rb
146
- - spec/swagger_v2/api_swagger_v2_param_type_spec.rb
147
- - spec/swagger_v2/api_swagger_v2_request_params_fix_spec.rb
148
- - spec/swagger_v2/api_swagger_v2_response_spec.rb
149
- - spec/swagger_v2/api_swagger_v2_response_with_examples_spec.rb
150
- - spec/swagger_v2/api_swagger_v2_response_with_headers_spec.rb
151
- - spec/swagger_v2/api_swagger_v2_response_with_models_spec.rb
152
- - spec/swagger_v2/api_swagger_v2_response_with_root_spec.rb
153
- - spec/swagger_v2/api_swagger_v2_spec.rb
154
- - spec/swagger_v2/api_swagger_v2_status_codes_spec.rb
155
- - spec/swagger_v2/api_swagger_v2_type-format_spec.rb
156
- - spec/swagger_v2/boolean_params_spec.rb
157
- - spec/swagger_v2/default_api_spec.rb
158
- - spec/swagger_v2/deprecated_field_spec.rb
159
- - spec/swagger_v2/description_not_initialized_spec.rb
160
- - spec/swagger_v2/endpoint_versioned_path_spec.rb
161
- - spec/swagger_v2/errors_spec.rb
162
- - spec/swagger_v2/float_api_spec.rb
163
- - spec/swagger_v2/form_params_spec.rb
164
- - spec/swagger_v2/grape-swagger_spec.rb
165
- - spec/swagger_v2/guarded_endpoint_spec.rb
166
- - spec/swagger_v2/hide_api_spec.rb
167
- - spec/swagger_v2/host_spec.rb
168
- - spec/swagger_v2/inheritance_and_discriminator_spec.rb
169
- - spec/swagger_v2/mount_override_api_spec.rb
170
- - spec/swagger_v2/mounted_target_class_spec.rb
171
- - spec/swagger_v2/namespace_tags_prefix_spec.rb
172
- - spec/swagger_v2/namespace_tags_spec.rb
173
- - spec/swagger_v2/namespaced_api_spec.rb
174
- - spec/swagger_v2/nicknamed_api_spec.rb
175
- - spec/swagger_v2/operation_id_api_spec.rb
176
- - spec/swagger_v2/param_multi_type_spec.rb
177
- - spec/swagger_v2/param_type_spec.rb
178
- - spec/swagger_v2/param_values_spec.rb
179
- - spec/swagger_v2/params_array_collection_format_spec.rb
180
- - spec/swagger_v2/params_array_spec.rb
181
- - spec/swagger_v2/params_example_spec.rb
182
- - spec/swagger_v2/params_hash_spec.rb
183
- - spec/swagger_v2/params_nested_spec.rb
184
- - spec/swagger_v2/parent_less_namespace_spec.rb
185
- - spec/swagger_v2/reference_entity_spec.rb
186
- - spec/swagger_v2/security_requirement_spec.rb
187
- - spec/swagger_v2/simple_mounted_api_spec.rb
188
- - spec/version_spec.rb
189
86
  homepage: https://github.com/ruby-grape/grape-swagger
190
87
  licenses:
191
88
  - MIT
@@ -199,14 +96,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
199
96
  requirements:
200
97
  - - ">="
201
98
  - !ruby/object:Gem::Version
202
- version: '2.7'
99
+ version: '3.1'
203
100
  required_rubygems_version: !ruby/object:Gem::Requirement
204
101
  requirements:
205
102
  - - ">="
206
103
  - !ruby/object:Gem::Version
207
104
  version: '0'
208
105
  requirements: []
209
- rubygems_version: 3.4.10
106
+ rubygems_version: 3.4.21
210
107
  signing_key:
211
108
  specification_version: 4
212
109
  summary: Add auto generated documentation to your Grape API that can be displayed
data/.coveralls.yml DELETED
@@ -1 +0,0 @@
1
- service_name: travis-ci
@@ -1,20 +0,0 @@
1
- # To get started with Dependabot version updates, you'll need to specify which
2
- # package ecosystems to update and where the package manifests are located.
3
- # Please see the documentation for all configuration options:
4
- # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
-
6
- version: 2
7
- updates:
8
- - package-ecosystem: "bundler" # See documentation for possible values
9
- directory: "/" # Location of package manifests
10
- schedule:
11
- interval: "weekly"
12
- day: "friday"
13
- assignees:
14
- - "LeFnord"
15
- - package-ecosystem: "github-actions"
16
- directory: "/"
17
- schedule:
18
- interval: weekly
19
- assignees:
20
- - "LeFnord"
@@ -1,120 +0,0 @@
1
- name: RSpec
2
-
3
- on:
4
- push:
5
- branches:
6
- - '*'
7
- pull_request:
8
- branches:
9
- - '*'
10
-
11
- permissions:
12
- contents: read
13
-
14
- jobs:
15
- rubocop:
16
- runs-on: ubuntu-latest
17
- steps:
18
- - uses: actions/checkout@v3
19
- - uses: ruby/setup-ruby@v1
20
- with:
21
- ruby-version: '3.2'
22
- bundler-cache: true
23
- - name: Run rubocop
24
- run: bundle exec rubocop --parallel --format progress
25
-
26
- grape-16:
27
- runs-on: ubuntu-latest
28
- needs: ['rubocop']
29
- env:
30
- GRAPE_VERSION: '1.6.2'
31
- strategy:
32
- matrix:
33
- ruby-version: ['3.0', '3.1', '3.2', 'head']
34
- steps:
35
- - name: Check out branch
36
- uses: actions/checkout@v3
37
- - name: Set up Ruby
38
- uses: ruby/setup-ruby@v1
39
- with:
40
- ruby-version: ${{ matrix.ruby-version }}
41
- - name: Run rspec wo model parser
42
- run: |
43
- bundle update
44
- bundle exec rspec
45
- - name: Run rspec w entity parser
46
- env:
47
- MODEL_PARSER: grape-swagger-entity
48
- run: |
49
- bundle update
50
- bundle exec rspec
51
- - name: Run rspec w representable parser
52
- env:
53
- MODEL_PARSER: grape-swagger-representable
54
- run: |
55
- bundle update
56
- bundle exec rspec
57
-
58
- grape-17:
59
- runs-on: ubuntu-latest
60
- needs: ['rubocop']
61
- env:
62
- GRAPE_VERSION: '1.7.1'
63
- strategy:
64
- matrix:
65
- ruby-version: ['3.0', '3.1', '3.2', 'head']
66
- steps:
67
- - name: Check out branch
68
- uses: actions/checkout@v3
69
- - name: Set up Ruby
70
- uses: ruby/setup-ruby@v1
71
- with:
72
- ruby-version: ${{ matrix.ruby-version }}
73
- - name: Run rspec wo model parser
74
- run: |
75
- bundle update
76
- bundle exec rspec
77
- - name: Run rspec w entity parser
78
- env:
79
- MODEL_PARSER: grape-swagger-entity
80
- run: |
81
- bundle update
82
- bundle exec rspec
83
- - name: Run rspec w representable parser
84
- env:
85
- MODEL_PARSER: grape-swagger-representable
86
- run: |
87
- bundle update
88
- bundle exec rspec
89
-
90
- grape-HEAD:
91
- runs-on: ubuntu-latest
92
- needs: ['rubocop']
93
- env:
94
- GRAPE_VERSION: 'HEAD'
95
- strategy:
96
- matrix:
97
- ruby-version: ['3.0', '3.1', '3.2', 'head']
98
- steps:
99
- - name: Check out branch
100
- uses: actions/checkout@v3
101
- - name: Set up Ruby
102
- uses: ruby/setup-ruby@v1
103
- with:
104
- ruby-version: ${{ matrix.ruby-version }}
105
- - name: Run rspec wo model parser
106
- run: |
107
- bundle update
108
- bundle exec rspec
109
- - name: Run rspec w entity parser
110
- env:
111
- MODEL_PARSER: grape-swagger-entity
112
- run: |
113
- bundle update
114
- bundle exec rspec
115
- - name: Run rspec w representable parser
116
- env:
117
- MODEL_PARSER: grape-swagger-representable
118
- run: |
119
- bundle update
120
- bundle exec rspec
data/.gitignore DELETED
@@ -1,45 +0,0 @@
1
- # yard generated
2
- doc
3
- .yardoc
4
-
5
- # bundler
6
- .bundle
7
-
8
- #IDEA temp files
9
- .idea
10
-
11
- # jeweler generated
12
- pkg
13
-
14
- # rails stuff
15
- log/*.log
16
- test/dummy/db/*.sqlite3
17
- test/dummy/log/*.log
18
- test/dummy/tmp/
19
- test/dummy/.sass-cache
20
- Gemfile.lock
21
-
22
- # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
23
- #
24
- # * Create a file at ~/.gitignore
25
- # * Include files you want ignored
26
- # * Run: git config --global core.excludesfile ~/.gitignore
27
- #
28
- # After doing this, these files will be ignored in all your git projects,
29
- # saving you from having to 'pollute' every project you touch with them
30
- #
31
- # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
32
- #
33
- # For MacOS:
34
- #
35
- .DS_Store
36
- .project
37
- example.json
38
- swagger_spec1.2/
39
- ToDo.md
40
- .ruby-version
41
- spec/params_entity_spec.rb
42
- vendor/bundle/
43
- spec/swagger_v2/x-dummy.rb
44
- coverage/
45
- .byebug_history
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --color
2
- --profile
3
- --format documentation
data/.rubocop.yml DELETED
@@ -1,136 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- AllCops:
4
- Exclude:
5
- - vendor/**/*
6
- - example/**/*
7
- NewCops: enable
8
- TargetRubyVersion: 3.2
9
- SuggestExtensions: false
10
-
11
- # Layout stuff
12
- #
13
- Layout/EmptyLinesAroundArguments:
14
- Enabled: false
15
-
16
- Layout/EmptyLinesAroundAttributeAccessor:
17
- Enabled: true
18
-
19
- Layout/FirstHashElementIndentation:
20
- EnforcedStyle: consistent
21
-
22
- Layout/LineLength:
23
- Max: 120
24
- Exclude:
25
- - spec/**/*
26
-
27
- Layout/SpaceAroundMethodCallOperator:
28
- Enabled: true
29
-
30
- # Lint stuff
31
- #
32
- Lint/ConstantDefinitionInBlock:
33
- Exclude:
34
- - spec/**/*
35
-
36
- Lint/DeprecatedOpenSSLConstant:
37
- Enabled: true
38
-
39
- Lint/DuplicateElsifCondition:
40
- Enabled: true
41
-
42
- Lint/MixedRegexpCaptureTypes:
43
- Enabled: true
44
-
45
- Lint/RaiseException:
46
- Enabled: true
47
-
48
- Lint/StructNewOverride:
49
- Enabled: true
50
-
51
- # Metrics stuff
52
- #
53
- Metrics/BlockLength:
54
- Exclude:
55
- - spec/**/*
56
-
57
- Metrics/ClassLength:
58
- Max: 350
59
-
60
- Metrics/CyclomaticComplexity:
61
- Max: 17
62
-
63
- Metrics/MethodLength:
64
- Exclude:
65
- - spec/**/*
66
-
67
- # Naming stuff
68
- #
69
- Naming:
70
- Enabled: false
71
-
72
- # Style stuff
73
- #
74
- Style/AccessorGrouping:
75
- Enabled: true
76
-
77
- Style/AsciiComments:
78
- Enabled: false
79
-
80
- Style/ArrayCoercion:
81
- Enabled: true
82
-
83
- Style/BisectedAttrAccessor:
84
- Enabled: true
85
-
86
- Style/CaseLikeIf:
87
- Enabled: true
88
-
89
- Style/ExponentialNotation:
90
- Enabled: true
91
-
92
- Style/ExplicitBlockArgument:
93
- Enabled: false
94
-
95
- Style/HashAsLastArrayItem:
96
- Enabled: true
97
-
98
- Style/HashEachMethods:
99
- Enabled: true
100
-
101
- Style/HashLikeCase:
102
- Enabled: true
103
-
104
- Style/HashSyntax:
105
- Enabled: false
106
-
107
- Style/HashTransformKeys:
108
- Enabled: true
109
-
110
- Style/HashTransformValues:
111
- Enabled: true
112
-
113
- Style/OpenStructUse:
114
- Exclude:
115
- - spec/**/*
116
-
117
- Style/RegexpLiteral:
118
- Enabled: false
119
-
120
- Style/RedundantAssignment:
121
- Enabled: true
122
-
123
- Style/RedundantFetchBlock:
124
- Enabled: true
125
-
126
- Style/RedundantFileExtensionInRequire:
127
- Enabled: true
128
-
129
- Style/RedundantRegexpCharacterClass:
130
- Enabled: true
131
-
132
- Style/RedundantRegexpEscape:
133
- Enabled: true
134
-
135
- Style/SlicingWithRange:
136
- Enabled: false