rspec-openapi 0.5.1 → 0.6.0

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: a696c48f7c8321f2b6807cd7b87ce31238c8cf5670fc9159fd4683cbb3c0698b
4
- data.tar.gz: 4ac66642cb916439782d6a28aaf393da4e240f7579e1a8c072f679267b697869
3
+ metadata.gz: b4d19b6239f38863e5cc4a7924d4dc9fc6f684a03f057f49371b4bd110fc312e
4
+ data.tar.gz: 972520dcffe3b393e32194a0fa4f9154c93c097f63d81750d7ac5d5b15d229d6
5
5
  SHA512:
6
- metadata.gz: b1f84f9475e56012381b1cc37dc4efcfe8eef0b09bdd6e94641c4961ef58b090312493501dfafc8a0ae6a48987da9f8db1f7fea0781b8ec35d4f3dcccf0d17b0
7
- data.tar.gz: f49341e3bb0886b26670c0be59a1a878291e65761f727ccf15d7076bcdada19bc5745cc7c78428c1e8b2338cc2b4665697569e3588630910ecf21338a19645f1
6
+ metadata.gz: 377aa3ea1a708b7ba2a8fd9cbaf96f0e6cf3588bdfbedcb14ee3ccb30c478c54e2d34fcd8e08bafc25c4c3cfab0062a4deb9781cf63e1c001b6e16750348222e
7
+ data.tar.gz: eebc893ceb3eaa4207fcbac83e453ea19adcfdc5b64d82725f441dfa8fa33142bab178dd21b76318dbf6f01afa80da40a9f50b5c87c726a2e63fd3bfd56e4386
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## v0.6.0
2
+
3
+ * Replace `RSpec::OpenAPI.server_urls` with `RSpec::OpenAPI.servers`
4
+ [#60](https://github.com/k0kubun/rspec-openapi/pull/60)
5
+
1
6
  ## v0.5.1
2
7
 
3
8
  * Clarify the version requirement for actionpack
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 `server_urls` - generate servers of a schema file
144
- RSpec::OpenAPI.server_urls = %w[
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
@@ -6,7 +6,7 @@ class << RSpec::OpenAPI::DefaultSchema = Object.new
6
6
  title: title,
7
7
  version: RSpec::OpenAPI.application_version,
8
8
  },
9
- servers: RSpec::OpenAPI.server_urls.map { |url| { url: url } } || [],
9
+ servers: RSpec::OpenAPI.servers,
10
10
  paths: {},
11
11
  }.freeze
12
12
  end
@@ -1,5 +1,5 @@
1
1
  module RSpec
2
2
  module OpenAPI
3
- VERSION = '0.5.1'
3
+ VERSION = '0.6.0'
4
4
  end
5
5
  end
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
- @server_urls = []
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, :server_urls, :example_types
16
+ attr_accessor :path, :comment, :enable_example, :description_builder, :info, :application_version, :request_headers, :servers, :example_types
17
17
  end
18
18
  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.5.1
4
+ version: 0.6.0
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-06-22 00:00:00.000000000 Z
11
+ date: 2022-07-01 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.3.7
92
+ rubygems_version: 3.1.2
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: Generate OpenAPI schema from RSpec request specs