grape-swagger 2.0.0 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 892c461e0945d50d3b923b7ee89f22aa1ab429f286f2f0fc4de76fe16098eb6f
|
4
|
+
data.tar.gz: 6c702b542c93dd5a3c0c459bd1135471bc112da3d1d7a48a882b0f2416542f22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66d718bc68a0e596eefb35d0cab1334754da8df8b3be13ba2114e0dac1930270d228c441d6fc8933aaef6379c7bee99d18a60e159aa747715e466922c5bca433
|
7
|
+
data.tar.gz: a380f3d1ac174ff023e2874e09d336f287bba09d6187e055477ee5d6841cedea2a910fa5f04ca38b3be848356d1a6cf085f9183e37b85a8b2cc8418b5e9616f0
|
data/CHANGELOG.md
CHANGED
@@ -9,7 +9,25 @@
|
|
9
9
|
* Your contribution here.
|
10
10
|
|
11
11
|
|
12
|
-
### 2.0.
|
12
|
+
### 2.0.2 (Februar 2, 2024)
|
13
|
+
|
14
|
+
#### Fixes
|
15
|
+
|
16
|
+
* [#918](https://github.com/ruby-grape/grape-swagger/pull/918): Fix params extension does not work when param_type is body - [@numbata](https://github.com/numbata)
|
17
|
+
|
18
|
+
|
19
|
+
### 2.0.1 (Januar 2, 2024)
|
20
|
+
|
21
|
+
#### Features
|
22
|
+
|
23
|
+
* [#914](https://github.com/ruby-grape/grape-swagger/pull/914): Support Ruby 3.3 - [@LeFnord](https://github.com/LeFnord)
|
24
|
+
|
25
|
+
#### Fixes
|
26
|
+
|
27
|
+
* [#916](https://github.com/ruby-grape/grape-swagger/pull/916): Restore Ruby 3.0 support - [@godfat](https://github.com/godfat)
|
28
|
+
|
29
|
+
|
30
|
+
### 2.0.0 (November 7, 2023)
|
13
31
|
|
14
32
|
#### Features
|
15
33
|
|
data/grape-swagger.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.metadata['rubygems_mfa_required'] = 'true'
|
16
16
|
|
17
|
-
s.required_ruby_version = '>= 3.
|
17
|
+
s.required_ruby_version = '>= 3.0'
|
18
18
|
s.add_runtime_dependency 'grape', '>= 1.7', '< 3.0'
|
19
19
|
s.add_runtime_dependency 'rack-test', '~> 2'
|
20
20
|
|
@@ -86,6 +86,7 @@ module GrapeSwagger
|
|
86
86
|
else
|
87
87
|
document_as_property(param)
|
88
88
|
end
|
89
|
+
add_extension_properties(properties[name], param)
|
89
90
|
|
90
91
|
required << name if deletable?(param) && param[:required]
|
91
92
|
end
|
@@ -102,6 +103,12 @@ module GrapeSwagger
|
|
102
103
|
end
|
103
104
|
end
|
104
105
|
|
106
|
+
def add_extension_properties(definition, values)
|
107
|
+
values.each do |key, value|
|
108
|
+
definition[key] = value if key.start_with?('x-')
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
105
112
|
def document_as_property(param)
|
106
113
|
property_keys.each_with_object({}) do |x, memo|
|
107
114
|
next unless param.key?(x)
|
@@ -108,6 +108,10 @@ module GrapeSwagger
|
|
108
108
|
set_additional_properties, additional_properties = parse_additional_properties(definitions, value_type)
|
109
109
|
array_items[:additionalProperties] = additional_properties if set_additional_properties
|
110
110
|
|
111
|
+
if value_type.key?(:items)
|
112
|
+
GrapeSwagger::DocMethods::Extensions.add_extensions_to_root(value_type[:items], array_items)
|
113
|
+
end
|
114
|
+
|
111
115
|
array_items
|
112
116
|
end
|
113
117
|
|
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: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LeFnord
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-02-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: grape
|
@@ -96,14 +96,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
96
|
requirements:
|
97
97
|
- - ">="
|
98
98
|
- !ruby/object:Gem::Version
|
99
|
-
version: '3.
|
99
|
+
version: '3.0'
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
rubygems_version: 3.
|
106
|
+
rubygems_version: 3.5.5
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Add auto generated documentation to your Grape API that can be displayed
|