rswag3-specs 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/Rakefile +1 -1
- data/lib/generators/{rswag → rswag3}/specs/install/USAGE +1 -1
- data/lib/generators/{rswag → rswag3}/specs/install/install_generator.rb +1 -1
- data/lib/generators/{rswag → rswag3}/specs/install/templates/swagger_helper.rb +1 -1
- data/lib/{rswag → rswag3}/specs/configuration.rb +1 -1
- data/lib/{rswag → rswag3}/specs/example_group_helpers.rb +1 -1
- data/lib/{rswag → rswag3}/specs/example_helpers.rb +3 -3
- data/lib/{rswag → rswag3}/specs/extended_schema.rb +1 -1
- data/lib/{rswag → rswag3}/specs/railtie.rb +2 -2
- data/lib/{rswag → rswag3}/specs/request_factory.rb +2 -2
- data/lib/{rswag → rswag3}/specs/response_validator.rb +3 -3
- data/lib/{rswag → rswag3}/specs/swagger_formatter.rb +2 -2
- data/lib/{rswag → rswag3}/specs.rb +5 -5
- data/lib/tasks/{rswag-specs_tasks.rake → rswag3-specs_tasks.rake} +4 -4
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f8a1a674a65813bc603e6490a83b83d31b85aa3
|
4
|
+
data.tar.gz: 08f3a982c20c10846673be8620f625ee744f122d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66d86efda7ca3eff28ba55e09dcd771aec646a15b4848d08297ecb60d5f76e0ff66338b8716bd34134c44a4a19d093ca12e8b140f8672d0f83d84eede33fd93f
|
7
|
+
data.tar.gz: e8f6166375c4c19a3589434decaa7b0e639e0a2d67181d26b6304d80e2c6008ce5b362b0f63b87ee1eb08561828acc87e2e8789934422c0ec86c1ddfcad2f5b0
|
data/MIT-LICENSE
CHANGED
data/Rakefile
CHANGED
@@ -14,7 +14,7 @@ RSpec.configure do |config|
|
|
14
14
|
# the root example_group in your specs, e.g. describe '...', swagger_doc: 'v2/swagger.json'
|
15
15
|
config.swagger_docs = {
|
16
16
|
'v1/swagger.json' => {
|
17
|
-
|
17
|
+
openapi: '3.0.0',
|
18
18
|
info: {
|
19
19
|
title: 'API V1',
|
20
20
|
version: 'v1'
|
@@ -1,9 +1,9 @@
|
|
1
|
-
module
|
1
|
+
module Rswag3
|
2
2
|
module Specs
|
3
3
|
class Railtie < ::Rails::Railtie
|
4
4
|
|
5
5
|
rake_tasks do
|
6
|
-
load File.expand_path('../../../tasks/
|
6
|
+
load File.expand_path('../../../tasks/rswag3-specs_tasks.rake', __FILE__)
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
@@ -2,11 +2,11 @@ require 'active_support/core_ext/hash/slice'
|
|
2
2
|
require 'active_support/core_ext/hash/conversions'
|
3
3
|
require 'json'
|
4
4
|
|
5
|
-
module
|
5
|
+
module Rswag3
|
6
6
|
module Specs
|
7
7
|
class RequestFactory
|
8
8
|
|
9
|
-
def initialize(config = ::
|
9
|
+
def initialize(config = ::Rswag3::Specs.config)
|
10
10
|
@config = config
|
11
11
|
end
|
12
12
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
require 'active_support/core_ext/hash/slice'
|
2
2
|
require 'json-schema'
|
3
3
|
require 'json'
|
4
|
-
require '
|
4
|
+
require 'rswag3/specs/extended_schema'
|
5
5
|
|
6
|
-
module
|
6
|
+
module Rswag3
|
7
7
|
module Specs
|
8
8
|
class ResponseValidator
|
9
9
|
|
10
|
-
def initialize(config = ::
|
10
|
+
def initialize(config = ::Rswag3::Specs.config)
|
11
11
|
@config = config
|
12
12
|
end
|
13
13
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'active_support/core_ext/hash/deep_merge'
|
2
2
|
require 'swagger_helper'
|
3
3
|
|
4
|
-
module
|
4
|
+
module Rswag3
|
5
5
|
module Specs
|
6
6
|
class SwaggerFormatter
|
7
7
|
|
@@ -10,7 +10,7 @@ module Rswag
|
|
10
10
|
::RSpec::Core::Formatters.register self, :example_group_finished, :stop
|
11
11
|
end
|
12
12
|
|
13
|
-
def initialize(output, config =
|
13
|
+
def initialize(output, config = Rswag3::Specs.config)
|
14
14
|
@output = output
|
15
15
|
@config = config
|
16
16
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'rspec/core'
|
2
|
-
require '
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
require '
|
2
|
+
require 'rswag3/specs/example_group_helpers'
|
3
|
+
require 'rswag3/specs/example_helpers'
|
4
|
+
require 'rswag3/specs/configuration'
|
5
|
+
require 'rswag3/specs/railtie' if defined?(Rails::Railtie)
|
6
6
|
|
7
|
-
module
|
7
|
+
module Rswag3
|
8
8
|
module Specs
|
9
9
|
|
10
10
|
# Extend RSpec with a swagger-based DSL
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'rspec/core/rake_task'
|
2
2
|
|
3
|
-
namespace :
|
3
|
+
namespace :rswag3 do
|
4
4
|
namespace :specs do
|
5
5
|
|
6
6
|
desc 'Generate Swagger JSON files from integration specs'
|
@@ -8,10 +8,10 @@ namespace :rswag do
|
|
8
8
|
t.pattern = 'spec/requests/**/*_spec.rb, spec/api/**/*_spec.rb, spec/integration/**/*_spec.rb'
|
9
9
|
|
10
10
|
# NOTE: rspec 2.x support
|
11
|
-
if
|
12
|
-
t.rspec_opts = [ '--format
|
11
|
+
if Rswag3::Specs::RSPEC_VERSION > 2 && Rswag3::Specs.config.swagger_dry_run
|
12
|
+
t.rspec_opts = [ '--format Rswag3::Specs::SwaggerFormatter', '--dry-run', '--order defined' ]
|
13
13
|
else
|
14
|
-
t.rspec_opts = [ '--format
|
14
|
+
t.rspec_opts = [ '--format Rswag3::Specs::SwaggerFormatter', '--order defined' ]
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rswag3-specs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evgeniy Koltsov
|
@@ -74,19 +74,19 @@ extra_rdoc_files: []
|
|
74
74
|
files:
|
75
75
|
- MIT-LICENSE
|
76
76
|
- Rakefile
|
77
|
-
- lib/generators/
|
78
|
-
- lib/generators/
|
79
|
-
- lib/generators/
|
80
|
-
- lib/
|
81
|
-
- lib/
|
82
|
-
- lib/
|
83
|
-
- lib/
|
84
|
-
- lib/
|
85
|
-
- lib/
|
86
|
-
- lib/
|
87
|
-
- lib/
|
88
|
-
- lib/
|
89
|
-
- lib/tasks/
|
77
|
+
- lib/generators/rswag3/specs/install/USAGE
|
78
|
+
- lib/generators/rswag3/specs/install/install_generator.rb
|
79
|
+
- lib/generators/rswag3/specs/install/templates/swagger_helper.rb
|
80
|
+
- lib/rswag3/specs.rb
|
81
|
+
- lib/rswag3/specs/configuration.rb
|
82
|
+
- lib/rswag3/specs/example_group_helpers.rb
|
83
|
+
- lib/rswag3/specs/example_helpers.rb
|
84
|
+
- lib/rswag3/specs/extended_schema.rb
|
85
|
+
- lib/rswag3/specs/railtie.rb
|
86
|
+
- lib/rswag3/specs/request_factory.rb
|
87
|
+
- lib/rswag3/specs/response_validator.rb
|
88
|
+
- lib/rswag3/specs/swagger_formatter.rb
|
89
|
+
- lib/tasks/rswag3-specs_tasks.rake
|
90
90
|
homepage: https://github.com/Je33/rswag
|
91
91
|
licenses:
|
92
92
|
- MIT
|