rspec-openapi 0.3.10 → 0.3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -0
- data/CHANGELOG.md +5 -0
- data/lib/rspec/openapi/schema_builder.rb +11 -1
- data/lib/rspec/openapi/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07e405e19fc7324fbfb0c67f18643ef3a924441f75971920e29dcb074c5fee41
|
4
|
+
data.tar.gz: 55ed7e046ef1dccb8e51d5d9d04012f32007a22da8d20217a582e14112eadc64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8784246f9827274f9a16ad7e70201f0470a63c9568109ae8e5f02a6a154a02829d6ae8e34d6e4b767ec92afa470a3b72be2bf32dcb2c51b6a628b0fdfa3c8fe
|
7
|
+
data.tar.gz: b690fb8885f58626825f072cd75e740649faa05e1b398bf26480a2b8b6013f51f0596c177c92ed57c23fa7c5e49d92d3110c6af406c17bf0f570a8fdcc50f272
|
data/.github/workflows/test.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -72,7 +72,7 @@ class << RSpec::OpenAPI::SchemaBuilder = Object.new
|
|
72
72
|
content: {
|
73
73
|
normalize_content_type(record.request_content_type) => {
|
74
74
|
schema: build_property(record.request_params),
|
75
|
-
example: (record.request_params if example_enabled?),
|
75
|
+
example: (build_example(record.request_params) if example_enabled?),
|
76
76
|
}.compact
|
77
77
|
}
|
78
78
|
}
|
@@ -126,6 +126,16 @@ class << RSpec::OpenAPI::SchemaBuilder = Object.new
|
|
126
126
|
end
|
127
127
|
end
|
128
128
|
|
129
|
+
def build_example(value)
|
130
|
+
return nil if value.nil?
|
131
|
+
value = value.dup
|
132
|
+
value.each do |key, v|
|
133
|
+
if v.is_a?(ActionDispatch::Http::UploadedFile)
|
134
|
+
value[key] = v.original_filename
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
129
139
|
def normalize_path(path)
|
130
140
|
path.gsub(%r|/:([^:/]+)|, '/{\1}')
|
131
141
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-openapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
|
-
rubygems_version: 3.
|
92
|
+
rubygems_version: 3.2.6
|
93
93
|
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: Generate OpenAPI schema from RSpec request specs
|