rspec-openapi 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/rspec/openapi/schema_builder.rb +10 -9
- data/lib/rspec/openapi/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d269feb84050ecb4ccc68924f76ae57ff4404521c22dc6cc004a177a579138b
|
4
|
+
data.tar.gz: 7df64e4c1ec76e652039e952b66d10322d3fa56f9a8af125da7872bade8ae2ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbb3af75f12db96f24941fb6f14112fa860ff98a23b44fecb9a2efb87974dfdb68d11afa113cedea15761dd59b33a621357a1e829613c61235338bf436d09965
|
7
|
+
data.tar.gz: 552c01a691716245c43c186cc913e26578d287c54e005633901da94e286694e1b83f47a0a438aebd18a0b6b8a1b6d7cb3dd1afe21faef87dae3765613ebef57f
|
data/CHANGELOG.md
CHANGED
@@ -79,7 +79,8 @@ class << RSpec::OpenAPI::SchemaBuilder = Object.new
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def build_property(value)
|
82
|
-
property =
|
82
|
+
property = build_type(value)
|
83
|
+
|
83
84
|
case value
|
84
85
|
when Array
|
85
86
|
property[:items] = build_property(value.first)
|
@@ -96,19 +97,19 @@ class << RSpec::OpenAPI::SchemaBuilder = Object.new
|
|
96
97
|
def build_type(value)
|
97
98
|
case value
|
98
99
|
when String
|
99
|
-
'string'
|
100
|
-
when Float
|
101
|
-
'float'
|
100
|
+
{ type: 'string' }
|
102
101
|
when Integer
|
103
|
-
'integer'
|
102
|
+
{ type: 'integer' }
|
103
|
+
when Float
|
104
|
+
{ type: 'number', format: 'float' }
|
104
105
|
when TrueClass, FalseClass
|
105
|
-
'boolean'
|
106
|
+
{ type: 'boolean' }
|
106
107
|
when Array
|
107
|
-
'array'
|
108
|
+
{ type: 'array' }
|
108
109
|
when Hash
|
109
|
-
'object'
|
110
|
+
{ type: 'object' }
|
110
111
|
when NilClass
|
111
|
-
'null'
|
112
|
+
{ type: 'null' }
|
112
113
|
else
|
113
114
|
raise NotImplementedError, "type detection is not implemented for: #{value.inspect}"
|
114
115
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -73,7 +73,7 @@ metadata:
|
|
73
73
|
homepage_uri: https://github.com/k0kubun/rspec-openapi
|
74
74
|
source_code_uri: https://github.com/k0kubun/rspec-openapi
|
75
75
|
changelog_uri: https://github.com/k0kubun/rspec-openapi/blob/master/CHANGELOG.md
|
76
|
-
post_install_message:
|
76
|
+
post_install_message:
|
77
77
|
rdoc_options: []
|
78
78
|
require_paths:
|
79
79
|
- lib
|
@@ -88,8 +88,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
requirements: []
|
91
|
-
rubygems_version: 3.1.
|
92
|
-
signing_key:
|
91
|
+
rubygems_version: 3.1.4
|
92
|
+
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: Generate OpenAPI schema from RSpec request specs
|
95
95
|
test_files: []
|