rspec-openapi 0.5.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile +4 -0
- data/README.md +2 -4
- data/lib/rspec/openapi/default_schema.rb +1 -1
- data/lib/rspec/openapi/schema_merger.rb +1 -1
- data/lib/rspec/openapi/version.rb +1 -1
- data/lib/rspec/openapi.rb +2 -2
- data/rspec-openapi.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9529f01aae2b2d1c77050b4a01f299c77a285057aa6fc7088a69ee7d2638e61
|
4
|
+
data.tar.gz: ca00d5561aaa0faeaadc1d42e7d2a25f729567b21af001c9677675e3738ae195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5de0ee281ad93e679c8f5456769fc1569f51ebfe5408c884d7061f9c802e3f8578ad48799a71306a6ce7cf0aa76959b2e30e2c97956e98237d08745c13d7aa54
|
7
|
+
data.tar.gz: 0a0076cedb0633762235833ead555db74720fad22c9f03fa84a7cdeaba617a823117a508c5acdd2e518ac1660582849c94ab68ccaed629e8f109ecfefe64227c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## v0.6.1
|
2
|
+
|
3
|
+
* Stabilize the order parameter objects and preserve newer examples
|
4
|
+
[#59](https://github.com/k0kubun/rspec-openapi/pull/59)
|
5
|
+
|
6
|
+
## v0.6.0
|
7
|
+
|
8
|
+
* Replace `RSpec::OpenAPI.server_urls` with `RSpec::OpenAPI.servers`
|
9
|
+
[#60](https://github.com/k0kubun/rspec-openapi/pull/60)
|
10
|
+
|
11
|
+
## v0.5.1
|
12
|
+
|
13
|
+
* Clarify the version requirement for actionpack
|
14
|
+
[#62](https://github.com/k0kubun/rspec-openapi/pull/62)
|
15
|
+
|
1
16
|
## v0.5.0
|
2
17
|
|
3
18
|
* Overwrite fields in an existing schema file instead of leaving all existing fields as is
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -140,10 +140,8 @@ RSpec::OpenAPI.info = {
|
|
140
140
|
# Set `headers` - generate parameters with headers for a request
|
141
141
|
RSpec::OpenAPI.request_headers = %w[X-Authorization-Token]
|
142
142
|
|
143
|
-
# Set `
|
144
|
-
RSpec::OpenAPI.
|
145
|
-
http://localhost:3000
|
146
|
-
]
|
143
|
+
# Set `servers` - generate servers of a schema file
|
144
|
+
RSpec::OpenAPI.servers = [{ url: 'http://localhost:3000' }]
|
147
145
|
|
148
146
|
# Generate a comment on top of a schema file
|
149
147
|
RSpec::OpenAPI.comment = <<~EOS
|
@@ -35,7 +35,7 @@ class << RSpec::OpenAPI::SchemaMerger = Object.new
|
|
35
35
|
elsif base[key].is_a?(Array) && value.is_a?(Array)
|
36
36
|
# parameters need to be merged as if `name` and `in` were the Hash keys.
|
37
37
|
if key == 'parameters'
|
38
|
-
base[key]
|
38
|
+
base[key] = value | base[key]
|
39
39
|
base[key].uniq! { |param| param.slice('name', 'in') }
|
40
40
|
else
|
41
41
|
base[key] = value
|
data/lib/rspec/openapi.rb
CHANGED
@@ -9,10 +9,10 @@ module RSpec::OpenAPI
|
|
9
9
|
@info = {}
|
10
10
|
@application_version = '1.0.0'
|
11
11
|
@request_headers = []
|
12
|
-
@
|
12
|
+
@servers = []
|
13
13
|
@example_types = %i[request]
|
14
14
|
|
15
15
|
class << self
|
16
|
-
attr_accessor :path, :comment, :enable_example, :description_builder, :info, :application_version, :request_headers, :
|
16
|
+
attr_accessor :path, :comment, :enable_example, :description_builder, :info, :application_version, :request_headers, :servers, :example_types
|
17
17
|
end
|
18
18
|
end
|
data/rspec-openapi.gemspec
CHANGED
@@ -23,6 +23,6 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
-
spec.add_dependency 'actionpack'
|
26
|
+
spec.add_dependency 'actionpack', '>= 5.2.0'
|
27
27
|
spec.add_dependency 'rspec'
|
28
28
|
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.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 5.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 5.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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.3.7
|
93
93
|
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: Generate OpenAPI schema from RSpec request specs
|