openapi_contracts 0.11.0 → 0.13.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e3c770fbbdd4c6d8a18f69f9deaf65959ce70088232ad8291a5aa10bf4b6f0e
|
4
|
+
data.tar.gz: 2248125b3e18a71d403f72b25eae01c2173628f0c58deaf7e004d501cb7f9b16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64d09afded34921b66bd12573998906882681cf68e62c277abb1f569afa3da93e856240877e9edffa1768c14d7a9766de0a9be57bf9f40a0b443c366187f8813
|
7
|
+
data.tar.gz: 3b93196eaaf631d853d693a6082b19399b2db334190cd0bc7d8d27d80ddf67260556249f284c515fb6c0bf207d9d6599a916a2bfbccdbb4c40d6637ae08004fd
|
@@ -35,20 +35,20 @@ module OpenapiContracts
|
|
35
35
|
end
|
36
36
|
|
37
37
|
# Returns an Enumerator over all Operations
|
38
|
-
def operations(&block)
|
38
|
+
def operations(&block) # rubocop:disable Naming/BlockForwarding
|
39
39
|
return enum_for(:operations) unless block_given?
|
40
40
|
|
41
41
|
paths.each do |path|
|
42
|
-
path.operations.each(&block)
|
42
|
+
path.operations.each(&block) # rubocop:disable Naming/BlockForwarding
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
46
|
# Returns an Enumerator over all Responses
|
47
|
-
def responses(&block)
|
47
|
+
def responses(&block) # rubocop:disable Naming/BlockForwarding
|
48
48
|
return enum_for(:responses) unless block_given?
|
49
49
|
|
50
50
|
operations.each do |operation|
|
51
|
-
operation.responses.each(&block)
|
51
|
+
operation.responses.each(&block) # rubocop:disable Naming/BlockForwarding
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -25,7 +25,9 @@ module OpenapiContracts::Parser::Transformers
|
|
25
25
|
# A JSON Pointer
|
26
26
|
generate_absolute_pointer(pointer)
|
27
27
|
elsif %r{^(?<relpath>[^#]+)(?:#/(?<pointer>.*))?} =~ target
|
28
|
-
ptr = @parser.filenesting[@cwd.join(relpath)]
|
28
|
+
ptr = @parser.filenesting[@cwd.join(relpath).cleanpath]
|
29
|
+
raise "Unknown file: #{@cwd.join(relpath).cleanpath.inspect}" unless ptr
|
30
|
+
|
29
31
|
tgt = ptr.to_json_pointer
|
30
32
|
tgt += "/#{pointer}" if pointer
|
31
33
|
tgt
|
@@ -34,14 +34,14 @@ module OpenapiContracts
|
|
34
34
|
def build_file_list
|
35
35
|
list = {@rootfile.relative_path_from(@cwd) => Doc::Pointer[]}
|
36
36
|
Dir[File.expand_path('components/**/*.yaml', @cwd)].each do |file|
|
37
|
-
pathname = Pathname(file).relative_path_from(@cwd)
|
37
|
+
pathname = Pathname(file).relative_path_from(@cwd).cleanpath
|
38
38
|
pointer = Doc::Pointer.from_path pathname.sub_ext('')
|
39
39
|
list.merge! pathname => pointer
|
40
40
|
end
|
41
41
|
YAML.safe_load_file(@rootfile).fetch('paths') { {} }.each_pair do |k, v|
|
42
42
|
next unless v['$ref'] && !v['$ref'].start_with?('#')
|
43
43
|
|
44
|
-
list.merge! Pathname(v['$ref']) => Doc::Pointer['paths', k]
|
44
|
+
list.merge! Pathname(v['$ref']).cleanpath => Doc::Pointer['paths', k]
|
45
45
|
end
|
46
46
|
list
|
47
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openapi_contracts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mkon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -34,16 +34,22 @@ dependencies:
|
|
34
34
|
name: json_schemer
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "
|
37
|
+
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 2
|
39
|
+
version: '2'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '2.2'
|
40
43
|
type: :runtime
|
41
44
|
prerelease: false
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
43
46
|
requirements:
|
44
|
-
- - "
|
47
|
+
- - ">="
|
45
48
|
- !ruby/object:Gem::Version
|
46
|
-
version: 2
|
49
|
+
version: '2'
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '2.2'
|
47
53
|
- !ruby/object:Gem::Dependency
|
48
54
|
name: rack
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,14 +98,14 @@ dependencies:
|
|
92
98
|
requirements:
|
93
99
|
- - '='
|
94
100
|
- !ruby/object:Gem::Version
|
95
|
-
version: 1.
|
101
|
+
version: 1.59.0
|
96
102
|
type: :development
|
97
103
|
prerelease: false
|
98
104
|
version_requirements: !ruby/object:Gem::Requirement
|
99
105
|
requirements:
|
100
106
|
- - '='
|
101
107
|
- !ruby/object:Gem::Version
|
102
|
-
version: 1.
|
108
|
+
version: 1.59.0
|
103
109
|
- !ruby/object:Gem::Dependency
|
104
110
|
name: rubocop-rspec
|
105
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,10 +186,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
180
186
|
requirements:
|
181
187
|
- - ">="
|
182
188
|
- !ruby/object:Gem::Version
|
183
|
-
version: '3.
|
189
|
+
version: '3.1'
|
184
190
|
- - "<"
|
185
191
|
- !ruby/object:Gem::Version
|
186
|
-
version: '3.
|
192
|
+
version: '3.4'
|
187
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
194
|
requirements:
|
189
195
|
- - ">="
|