swagger-diff 1.0.5 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/.travis.yml +8 -0
- data/CHANGELOG.md +51 -12
- data/CODE_OF_CONDUCT.md +50 -0
- data/CONTRIBUTING.md +3 -1
- data/{LICENSE.txt → LICENSE.md} +0 -0
- data/README.md +62 -11
- data/exe/swagger-diff +39 -7
- data/lib/swagger/diff.rb +5 -3
- data/lib/swagger/diff/diff.rb +110 -37
- data/lib/swagger/diff/specification.rb +110 -38
- data/lib/swagger/diff/version.rb +1 -1
- data/schema/json/LICENSE.md +25 -0
- data/schema/json/schema.json +150 -0
- data/schema/oai/LICENSE.md +11 -0
- data/schema/oai/schema.json +1607 -0
- data/swagger-diff.gemspec +15 -9
- metadata +25 -22
- data/lib/swagger/diff/patch.rb +0 -29
data/swagger-diff.gemspec
CHANGED
@@ -9,11 +9,15 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ['Jeff Cousens']
|
10
10
|
spec.email = ['opensource@civisanalytics.com']
|
11
11
|
|
12
|
-
spec.summary = 'Utility for comparing two Swagger specifications.'
|
13
|
-
spec.description = 'Swagger::Diff is a utility for comparing two
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
spec.summary = 'Utility for comparing two OAI (fka Swagger) specifications.'
|
13
|
+
spec.description = 'Swagger::Diff is a utility for comparing two ' \
|
14
|
+
'different Open API Initiative (OAI) specifications ' \
|
15
|
+
'(fka Swagger specifications). ' \
|
16
|
+
'It is intended to determine whether a newer API ' \
|
17
|
+
'specification is backwards-compatible with an ' \
|
18
|
+
'older API specification. ' \
|
19
|
+
'It provides both an RSpec matcher and helper ' \
|
20
|
+
'functions that can be used directly.'
|
17
21
|
spec.homepage = 'https://github.com/civisanalytics/swagger-diff'
|
18
22
|
spec.license = 'BSD 3-Clause'
|
19
23
|
|
@@ -22,13 +26,15 @@ and helper functions that can be used directly.'
|
|
22
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
27
|
spec.require_paths = ['lib']
|
24
28
|
|
25
|
-
spec.
|
29
|
+
spec.required_ruby_version = '~> 2.0'
|
30
|
+
|
31
|
+
spec.add_dependency 'json-schema', '~> 2.6'
|
26
32
|
spec.add_dependency 'rspec-expectations', '~> 3.3'
|
27
33
|
spec.add_development_dependency 'bundler', '~> 1.9'
|
28
|
-
spec.add_development_dependency 'rake', '~>
|
34
|
+
spec.add_development_dependency 'rake', '~> 11.1'
|
29
35
|
spec.add_development_dependency 'rspec', '~> 3.3'
|
30
36
|
spec.add_development_dependency 'pry', '~> 0.10.1'
|
31
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
37
|
+
spec.add_development_dependency 'rubocop', '~> 0.40.0'
|
32
38
|
spec.add_development_dependency 'vcr', '~> 3.0'
|
33
|
-
spec.add_development_dependency 'webmock', '~>
|
39
|
+
spec.add_development_dependency 'webmock', '~> 2.0'
|
34
40
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swagger-diff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Cousens
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: json-schema
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '2.6'
|
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: '2.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec-expectations
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '11.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '11.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.40.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.40.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: vcr
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,19 +128,18 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '2.0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
139
|
-
description:
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
and helper functions that can be used directly.
|
138
|
+
version: '2.0'
|
139
|
+
description: Swagger::Diff is a utility for comparing two different Open API Initiative
|
140
|
+
(OAI) specifications (fka Swagger specifications). It is intended to determine whether
|
141
|
+
a newer API specification is backwards-compatible with an older API specification.
|
142
|
+
It provides both an RSpec matcher and helper functions that can be used directly.
|
144
143
|
email:
|
145
144
|
- opensource@civisanalytics.com
|
146
145
|
executables:
|
@@ -154,9 +153,10 @@ files:
|
|
154
153
|
- ".ruby-version"
|
155
154
|
- ".travis.yml"
|
156
155
|
- CHANGELOG.md
|
156
|
+
- CODE_OF_CONDUCT.md
|
157
157
|
- CONTRIBUTING.md
|
158
158
|
- Gemfile
|
159
|
-
- LICENSE.
|
159
|
+
- LICENSE.md
|
160
160
|
- README.md
|
161
161
|
- Rakefile
|
162
162
|
- bin/console
|
@@ -164,10 +164,13 @@ files:
|
|
164
164
|
- exe/swagger-diff
|
165
165
|
- lib/swagger/diff.rb
|
166
166
|
- lib/swagger/diff/diff.rb
|
167
|
-
- lib/swagger/diff/patch.rb
|
168
167
|
- lib/swagger/diff/rspec_matchers.rb
|
169
168
|
- lib/swagger/diff/specification.rb
|
170
169
|
- lib/swagger/diff/version.rb
|
170
|
+
- schema/json/LICENSE.md
|
171
|
+
- schema/json/schema.json
|
172
|
+
- schema/oai/LICENSE.md
|
173
|
+
- schema/oai/schema.json
|
171
174
|
- swagger-diff.gemspec
|
172
175
|
- swagger-diff.gif
|
173
176
|
homepage: https://github.com/civisanalytics/swagger-diff
|
@@ -180,9 +183,9 @@ require_paths:
|
|
180
183
|
- lib
|
181
184
|
required_ruby_version: !ruby/object:Gem::Requirement
|
182
185
|
requirements:
|
183
|
-
- - "
|
186
|
+
- - "~>"
|
184
187
|
- !ruby/object:Gem::Version
|
185
|
-
version: '0'
|
188
|
+
version: '2.0'
|
186
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
190
|
requirements:
|
188
191
|
- - ">="
|
@@ -190,8 +193,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
193
|
version: '0'
|
191
194
|
requirements: []
|
192
195
|
rubyforge_project:
|
193
|
-
rubygems_version: 2.4
|
196
|
+
rubygems_version: 2.6.4
|
194
197
|
signing_key:
|
195
198
|
specification_version: 4
|
196
|
-
summary: Utility for comparing two Swagger specifications.
|
199
|
+
summary: Utility for comparing two OAI (fka Swagger) specifications.
|
197
200
|
test_files: []
|
data/lib/swagger/diff/patch.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# Workaround for Swagger::V2::SecurityScheme[1] incorrectly specifying
|
2
|
-
# required fields. maxlinc is right: the Swagger specification[2] is
|
3
|
-
# misleading. Fixed Fields suggests many parameters are required that are not
|
4
|
-
# required by Swagger's official validator[3]. Working around this by removing
|
5
|
-
# them from the array of required properties.
|
6
|
-
#
|
7
|
-
# [1] https://github.com/swagger-rb/swagger-rb/blob/v0.2.3/lib/swagger/v2/security_scheme.rb#L9-L11
|
8
|
-
# [2] http://swagger.io/specification/#securityDefinitionsObject
|
9
|
-
# [3] https://github.com/swagger-api/validator-badge
|
10
|
-
|
11
|
-
OAUTH2_PARAMS = [:flow, :authorizationUrl, :scopes]
|
12
|
-
|
13
|
-
Swagger::V2::SecurityScheme.required_properties.reject! do |k, _|
|
14
|
-
OAUTH2_PARAMS.include?(k)
|
15
|
-
end
|
16
|
-
|
17
|
-
# Workaround for Swagger::V2::Operation[1] not including deprecated. Patching
|
18
|
-
# pending a merge/release of #11[2].
|
19
|
-
#
|
20
|
-
# [1] https://github.com/swagger-rb/swagger-rb/blob/master/lib/swagger/v2/operation.rb
|
21
|
-
# [2] https://github.com/swagger-rb/swagger-rb/pull/12/files
|
22
|
-
|
23
|
-
module Swagger
|
24
|
-
module V2
|
25
|
-
class Operation
|
26
|
-
field :deprecated, String
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|