openapi_parser 2.0.0 → 2.1.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: 00f123cd8511ebd3cbe2f48ec901285d591a93ac1a56d2693f2ba896aebdf076
4
- data.tar.gz: 263634fb1891c2fae9756c64e3fb0d0b3832484aced219b6091a7af9db3e6793
3
+ metadata.gz: 46f9ea4e608b98aadd42d6da1ad0f3ab83f8b87c14fee89d287bf7d92d40a38a
4
+ data.tar.gz: 84aadee40dbb76d7332fa222d05e447a3070c57311dc6d872267b36b68183e39
5
5
  SHA512:
6
- metadata.gz: 3f58453f7daa0e73156cd221e1027cd7da7ecb8e63ce13fdee538c544380a763fa6c1b1de52e6a3a191e0f54c4fbde2ba1fd747d88ec5418a25075adcb1f246f
7
- data.tar.gz: 9ebff3ee048466e02918cc6993de56147b640903418a1fbff9a6669a277c72954541c441bc2f7acdfff555ee4765c4392e7c3e7367235caff7774db01048f1ea
6
+ metadata.gz: dea21c51e1744e593cd110b4b697c212e31d8834e12f148b73ff53e9777cabe83250db73b00102d3cab6f865b30b682f427adc39f7f22c71698965af76fb1cee
7
+ data.tar.gz: 98e5c2e15c264918477a36c94788c9ae6c3054c0c86bc2b2b98e1eb5effec77698c00e412682065f2fc0f8538588fde298f54a4083843673de574947dc7e917f
data/CHANGELOG.md CHANGED
@@ -1,10 +1,13 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 2.1.0 (2024-04-03)
4
+ ### Fixed
5
+ * Add full-date compliant date format validation #164
6
+
3
7
  ## 1.1.0 (2023-10-15)
4
8
  ### Added
5
9
  * Support for uniqueItems in array #154
6
10
  * Fix nullable field does not work with allOf, anyOf and oneOf keyword #128
7
- * drop ruby 2.6 #158
8
11
 
9
12
  ## 1.0.0 (2021-02-03)
10
13
  ### Added
@@ -75,11 +75,15 @@ class OpenAPIParser::SchemaValidator
75
75
  return [value, nil] unless schema.format == 'date'
76
76
 
77
77
  begin
78
- Date.strptime(value, "%Y-%m-%d")
78
+ parsed_date = Date.iso8601(value)
79
79
  rescue ArgumentError
80
80
  return [nil, OpenAPIParser::InvalidDateFormat.new(value, schema.object_reference)]
81
81
  end
82
82
 
83
+ unless parsed_date.strftime('%Y-%m-%d') == value
84
+ return [nil, OpenAPIParser::InvalidDateFormat.new(value, schema.object_reference)]
85
+ end
86
+
83
87
  return [value, nil]
84
88
  end
85
89
 
@@ -1,3 +1,3 @@
1
1
  module OpenAPIParser
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.1.0'.freeze
3
3
  end
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: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ota42y
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-15 00:00:00.000000000 Z
11
+ date: 2024-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,34 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.12.0
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.12.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry-byebug
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: rake
43
71
  requirement: !ruby/object:Gem::Requirement
@@ -237,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
265
  - !ruby/object:Gem::Version
238
266
  version: '0'
239
267
  requirements: []
240
- rubygems_version: 3.4.20
268
+ rubygems_version: 3.1.2
241
269
  signing_key:
242
270
  specification_version: 4
243
271
  summary: OpenAPI3 parser