rspec_api_documentation-open_api 0.2.1 → 0.2.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: '08c1be1065742c4ce2f1d1d8e26f225cd8dcd664a8433a81a1da5392dd4ae74c'
4
- data.tar.gz: 64a2fb1e193248d5d5eeaa777d528fb3a800afd7fd047d4f7d1a71f878614d12
3
+ metadata.gz: dd0494e891fbd0fee7a0103bcfae6a13bc696e97805bf087cbf759e5c55f8275
4
+ data.tar.gz: 5f945c77b66e94560cd627bba6890bbc8abdc4708a05f1aa89f23ca709f08a20
5
5
  SHA512:
6
- metadata.gz: d1c9995f8be046c821e2c8782ca1502473b023a1536783440558e33b42c10b3b0f25ba95c6ec585288cf1c21ea229cd473de6887a4dc1b92d8ebd0ef565b1e72
7
- data.tar.gz: 16abf0d6889783983dfbb3661dab7cb5fe9cc218bcf222de68ccbf59c6f80ce26397a683acaf065531865cdfcb766f35dc942e166f740367ad659415f3c87488
6
+ metadata.gz: 26b079ad9a3e6d87cc17d6164dd488bd1fddb3d1ee970726c8ee48fc4b00507967a76f13f8a07b80aee98d5e52f0b82adc3abef98fa3ae5ed84ebd1bb28b7191
7
+ data.tar.gz: ab2b1d2612725ea551d24507b52bf3fcc954d8c462556f46adb2038e05319065202c094a5a29b6688cc1ca0209222aadb7a23c9ce3f65795bd0e6889837cbcb8
data/README.md CHANGED
@@ -39,7 +39,7 @@ Change default host and servers spec using
39
39
  ```
40
40
  RspecApiDocumentation.configure do |config| # These are defaults
41
41
  config.open_api = {
42
- "host": {
42
+ "info": {
43
43
  "version" => "1.0.0",
44
44
  "title" => "Open API",
45
45
  "description" => "Open API",
@@ -1,5 +1,5 @@
1
1
  module RspecApiDocumentation
2
2
  module OpenApi
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
@@ -1,8 +1,10 @@
1
+ require "rspec_api_documentation"
1
2
  require "rspec_api_documentation/open_api/version"
2
3
 
3
4
  module RspecApiDocumentation
4
5
  module Writers
5
6
  extend ActiveSupport::Autoload
7
+ RspecApiDocumentation::Configuration.add_setting :open_api, default: {}
6
8
 
7
9
  autoload :OpenApiWriter
8
10
  autoload :OpenApiJsonWriter
@@ -8,8 +8,6 @@ module RspecApiDocumentation
8
8
  class OpenApiWriter < Writer
9
9
  attr_writer :types, :swagger
10
10
 
11
- RspecApiDocumentation::Configuration.add_setting :open_api, default: {}
12
-
13
11
  def write
14
12
  File.open(configuration.docs_dir.join("open_api.json"), "w") do |f|
15
13
  f.write JSON.pretty_generate(get_hash)
@@ -243,7 +241,7 @@ module RspecApiDocumentation
243
241
  end
244
242
 
245
243
  def info
246
- RspecApiDocumentation.configuration.open_api["host"] || {
244
+ RspecApiDocumentation.configuration.open_api["info"] || {
247
245
  "version" => "1.0.0",
248
246
  "title" => "Open API",
249
247
  "description" => "Open API",
@@ -254,7 +252,7 @@ module RspecApiDocumentation
254
252
  end
255
253
 
256
254
  def servers
257
- RspecApiDocumentation.configuration.open_api["server"] || [
255
+ RspecApiDocumentation.configuration.open_api["servers"] || [
258
256
  {
259
257
  "url" => "http://localhost:{port}",
260
258
  "description" => "Development server",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_api_documentation-open_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaditya Taparia