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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/README.md +1 -0
- data/grape-swagger.gemspec +5 -5
- data/lib/grape-swagger/doc_methods/extensions.rb +2 -1
- data/lib/grape-swagger/doc_methods/move_params.rb +1 -0
- data/lib/grape-swagger/endpoint.rb +1 -1
- data/lib/grape-swagger/version.rb +1 -1
- metadata +26 -129
- data/.coveralls.yml +0 -1
- data/.github/dependabot.yml +0 -20
- data/.github/workflows/ci.yml +0 -120
- data/.gitignore +0 -45
- data/.rspec +0 -3
- data/.rubocop.yml +0 -136
- data/.rubocop_todo.yml +0 -45
- data/Dangerfile +0 -3
- data/Gemfile +0 -43
- data/Rakefile +0 -20
- data/example/api/endpoints.rb +0 -131
- data/example/api/entities.rb +0 -18
- data/example/config.ru +0 -42
- data/example/example_requests.postman_collection +0 -146
- data/example/splines.png +0 -0
- data/example/swagger-example.png +0 -0
- data/spec/issues/267_nested_namespaces.rb +0 -55
- data/spec/issues/403_versions_spec.rb +0 -124
- data/spec/issues/427_entity_as_string_spec.rb +0 -39
- data/spec/issues/430_entity_definitions_spec.rb +0 -94
- data/spec/issues/532_allow_custom_format_spec.rb +0 -38
- data/spec/issues/533_specify_status_code_spec.rb +0 -78
- data/spec/issues/537_enum_values_spec.rb +0 -50
- data/spec/issues/539_array_post_body_spec.rb +0 -65
- data/spec/issues/542_array_of_type_in_post_body_spec.rb +0 -46
- data/spec/issues/553_align_array_put_post_params_spec.rb +0 -144
- data/spec/issues/572_array_post_body_spec.rb +0 -51
- data/spec/issues/579_align_put_post_parameters_spec.rb +0 -179
- data/spec/issues/582_file_response_spec.rb +0 -55
- data/spec/issues/587_range_parameter_delimited_by_dash_spec.rb +0 -26
- data/spec/issues/605_root_route_documentation_spec.rb +0 -23
- data/spec/issues/650_params_array_spec.rb +0 -59
- data/spec/issues/677_consumes_produces_add_swagger_documentation_options_spec.rb +0 -100
- data/spec/issues/680_keep_204_error_schemas_spec.rb +0 -55
- data/spec/issues/751_deeply_nested_objects_spec.rb +0 -190
- data/spec/issues/776_multiple_presents_spec.rb +0 -59
- data/spec/issues/784_extensions_on_params_spec.rb +0 -38
- data/spec/issues/809_utf8_routes_spec.rb +0 -55
- data/spec/issues/832_array_hash_float_decimal_spec.rb +0 -111
- data/spec/issues/847_route_param_options_spec.rb +0 -37
- data/spec/lib/data_type_spec.rb +0 -111
- data/spec/lib/endpoint/params_parser_spec.rb +0 -124
- data/spec/lib/endpoint_spec.rb +0 -153
- data/spec/lib/extensions_spec.rb +0 -185
- data/spec/lib/format_data_spec.rb +0 -115
- data/spec/lib/model_parsers_spec.rb +0 -104
- data/spec/lib/move_params_spec.rb +0 -444
- data/spec/lib/oapi_tasks_spec.rb +0 -163
- data/spec/lib/operation_id_spec.rb +0 -55
- data/spec/lib/optional_object_spec.rb +0 -47
- data/spec/lib/parse_params_spec.rb +0 -82
- data/spec/lib/path_string_spec.rb +0 -101
- data/spec/lib/produces_consumes_spec.rb +0 -116
- data/spec/lib/tag_name_description_spec.rb +0 -80
- data/spec/lib/version_spec.rb +0 -28
- data/spec/spec_helper.rb +0 -39
- data/spec/support/empty_model_parser.rb +0 -23
- data/spec/support/grape_version.rb +0 -13
- data/spec/support/mock_parser.rb +0 -23
- data/spec/support/model_parsers/entity_parser.rb +0 -334
- data/spec/support/model_parsers/mock_parser.rb +0 -346
- data/spec/support/model_parsers/representable_parser.rb +0 -406
- data/spec/support/namespace_tags.rb +0 -93
- data/spec/support/the_paths_definitions.rb +0 -109
- data/spec/swagger_v2/api_documentation_spec.rb +0 -26
- data/spec/swagger_v2/api_swagger_v2_additional_properties_spec.rb +0 -83
- data/spec/swagger_v2/api_swagger_v2_body_definitions_spec.rb +0 -48
- data/spec/swagger_v2/api_swagger_v2_definitions-models_spec.rb +0 -36
- data/spec/swagger_v2/api_swagger_v2_detail_spec.rb +0 -79
- data/spec/swagger_v2/api_swagger_v2_extensions_spec.rb +0 -145
- data/spec/swagger_v2/api_swagger_v2_format-content_type_spec.rb +0 -137
- data/spec/swagger_v2/api_swagger_v2_global_configuration_spec.rb +0 -56
- data/spec/swagger_v2/api_swagger_v2_hash_and_array_spec.rb +0 -64
- data/spec/swagger_v2/api_swagger_v2_headers_spec.rb +0 -58
- data/spec/swagger_v2/api_swagger_v2_hide_documentation_path_spec.rb +0 -57
- data/spec/swagger_v2/api_swagger_v2_hide_param_spec.rb +0 -103
- data/spec/swagger_v2/api_swagger_v2_ignore_defaults_spec.rb +0 -48
- data/spec/swagger_v2/api_swagger_v2_mounted_spec.rb +0 -145
- data/spec/swagger_v2/api_swagger_v2_param_type_body_nested_spec.rb +0 -355
- data/spec/swagger_v2/api_swagger_v2_param_type_body_spec.rb +0 -217
- data/spec/swagger_v2/api_swagger_v2_param_type_spec.rb +0 -239
- data/spec/swagger_v2/api_swagger_v2_request_params_fix_spec.rb +0 -72
- data/spec/swagger_v2/api_swagger_v2_response_spec.rb +0 -143
- data/spec/swagger_v2/api_swagger_v2_response_with_examples_spec.rb +0 -135
- data/spec/swagger_v2/api_swagger_v2_response_with_headers_spec.rb +0 -216
- data/spec/swagger_v2/api_swagger_v2_response_with_models_spec.rb +0 -55
- data/spec/swagger_v2/api_swagger_v2_response_with_root_spec.rb +0 -153
- data/spec/swagger_v2/api_swagger_v2_spec.rb +0 -237
- data/spec/swagger_v2/api_swagger_v2_status_codes_spec.rb +0 -93
- data/spec/swagger_v2/api_swagger_v2_type-format_spec.rb +0 -89
- data/spec/swagger_v2/boolean_params_spec.rb +0 -35
- data/spec/swagger_v2/default_api_spec.rb +0 -175
- data/spec/swagger_v2/deprecated_field_spec.rb +0 -25
- data/spec/swagger_v2/description_not_initialized_spec.rb +0 -39
- data/spec/swagger_v2/endpoint_versioned_path_spec.rb +0 -130
- data/spec/swagger_v2/errors_spec.rb +0 -77
- data/spec/swagger_v2/float_api_spec.rb +0 -33
- data/spec/swagger_v2/form_params_spec.rb +0 -67
- data/spec/swagger_v2/grape-swagger_spec.rb +0 -17
- data/spec/swagger_v2/guarded_endpoint_spec.rb +0 -162
- data/spec/swagger_v2/hide_api_spec.rb +0 -147
- data/spec/swagger_v2/host_spec.rb +0 -43
- data/spec/swagger_v2/inheritance_and_discriminator_spec.rb +0 -57
- data/spec/swagger_v2/mount_override_api_spec.rb +0 -58
- data/spec/swagger_v2/mounted_target_class_spec.rb +0 -76
- data/spec/swagger_v2/namespace_tags_prefix_spec.rb +0 -122
- data/spec/swagger_v2/namespace_tags_spec.rb +0 -78
- data/spec/swagger_v2/namespaced_api_spec.rb +0 -121
- data/spec/swagger_v2/nicknamed_api_spec.rb +0 -25
- data/spec/swagger_v2/operation_id_api_spec.rb +0 -27
- data/spec/swagger_v2/param_multi_type_spec.rb +0 -77
- data/spec/swagger_v2/param_type_spec.rb +0 -87
- data/spec/swagger_v2/param_values_spec.rb +0 -162
- data/spec/swagger_v2/params_array_collection_format_spec.rb +0 -105
- data/spec/swagger_v2/params_array_spec.rb +0 -203
- data/spec/swagger_v2/params_example_spec.rb +0 -40
- data/spec/swagger_v2/params_hash_spec.rb +0 -71
- data/spec/swagger_v2/params_nested_spec.rb +0 -86
- data/spec/swagger_v2/parent_less_namespace_spec.rb +0 -32
- data/spec/swagger_v2/reference_entity_spec.rb +0 -129
- data/spec/swagger_v2/security_requirement_spec.rb +0 -46
- data/spec/swagger_v2/simple_mounted_api_spec.rb +0 -326
- data/spec/version_spec.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '019fb3e92a8ab175f13ce61d4a04098afc821ad9c085c64685de5effb5ad02ee'
|
4
|
+
data.tar.gz: f2ffcf39c19988d5c04320800f8032e5bc3974b4d382e5c1a4b4ef76ceb1fcf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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>
|
data/grape-swagger.gemspec
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
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 = '>=
|
19
|
-
s.add_runtime_dependency 'grape', '
|
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
|
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
|
-
|
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)
|
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)
|
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:
|
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-
|
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: '
|
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: '
|
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: '
|
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.
|
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
|
data/.github/dependabot.yml
DELETED
@@ -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"
|
data/.github/workflows/ci.yml
DELETED
@@ -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
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
|