openapi_parser 0.7.0 → 0.8.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4bfefc368dc8568d119cd8d16e30b1d804fa4651d44d857c13f8374ce2d7a70
|
4
|
+
data.tar.gz: a2120a0b9207a8f8342b7ccc9bfba70d0a40a03e549beeb0d4b5af47df8f6437
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 675babc15acd34ad745577c46a806ccf9a24e05077359ab7c28ff037c6a7f5f7196021a597fd50a277c1c19f7277ea9f6ddf722d240113fd48329fd4780ab55c
|
7
|
+
data.tar.gz: 02faec5c8dd2f48dfd5be840c92fb0f0829ec3b15342c96b042ac8d75c2dd954f76acbe752687066afc7fe8fbacf0f2d0aaca452b9162e11ca1a8f1d15baddd3
|
data/CHANGELOG.md
CHANGED
@@ -155,14 +155,15 @@ module OpenAPIParser
|
|
155
155
|
end
|
156
156
|
|
157
157
|
class InvalidPattern < OpenAPIError
|
158
|
-
def initialize(value, pattern, reference)
|
158
|
+
def initialize(value, pattern, reference, example)
|
159
159
|
super(reference)
|
160
160
|
@value = value
|
161
161
|
@pattern = pattern
|
162
|
+
@example = example
|
162
163
|
end
|
163
164
|
|
164
165
|
def message
|
165
|
-
"#{@reference} pattern #{@pattern} does not match value: #{@value}"
|
166
|
+
"#{@reference} pattern #{@pattern} does not match value: #{@value}#{@example ? ", example: #{@example}" : ""}"
|
166
167
|
end
|
167
168
|
end
|
168
169
|
|
@@ -55,7 +55,7 @@ class OpenAPIParser::SchemaValidator
|
|
55
55
|
return [value, nil] unless schema.pattern
|
56
56
|
return [value, nil] if value =~ /#{schema.pattern}/
|
57
57
|
|
58
|
-
[nil, OpenAPIParser::InvalidPattern.new(value, schema.pattern, schema.object_reference)]
|
58
|
+
[nil, OpenAPIParser::InvalidPattern.new(value, schema.pattern, schema.object_reference, schema.example)]
|
59
59
|
end
|
60
60
|
|
61
61
|
def validate_max_min_length(value, schema)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openapi_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ota42y
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|