openapi_parser 1.0.0.beta1 → 2.0.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 +4 -4
- data/.github/workflows/ci.yaml +9 -2
- data/.ruby-version +1 -1
- data/CHANGELOG.md +10 -0
- data/Rakefile +1 -1
- data/Steepfile +3 -3
- data/lib/openapi_parser/errors.rb +22 -0
- data/lib/openapi_parser/{schema_validators → schema_validator}/all_of_validator.rb +4 -0
- data/lib/openapi_parser/{schema_validators → schema_validator}/any_of_validator.rb +3 -0
- data/lib/openapi_parser/{schema_validators → schema_validator}/array_validator.rb +9 -0
- data/lib/openapi_parser/{schema_validators → schema_validator}/base.rb +1 -1
- data/lib/openapi_parser/{schema_validators → schema_validator}/one_of_validator.rb +3 -0
- data/lib/openapi_parser/{schema_validators → schema_validator}/string_validator.rb +25 -22
- data/lib/openapi_parser/{schema_validators → schema_validator}/unspecified_type_validator.rb +1 -1
- data/lib/openapi_parser/schema_validator.rb +15 -15
- data/lib/openapi_parser/schemas/classes.rb +1 -0
- data/lib/openapi_parser/schemas/info.rb +6 -0
- data/lib/openapi_parser/schemas/openapi.rb +4 -0
- data/lib/openapi_parser/schemas.rb +1 -0
- data/lib/openapi_parser/version.rb +1 -1
- data/lib/openapi_parser.rb +6 -2
- data/openapi_parser.gemspec +9 -3
- data/sig/openapi_parser/config.rbs +2 -0
- data/sig/openapi_parser/errors.rbs +22 -0
- data/sig/openapi_parser/reference_expander.rbs +3 -0
- data/sig/openapi_parser/schema_validators/base.rbs +4 -3
- data/sig/types.rbs +5 -0
- data/sig/wip_types.rbs +0 -3
- metadata +41 -52
- /data/lib/openapi_parser/{schema_validators → schema_validator}/boolean_validator.rb +0 -0
- /data/lib/openapi_parser/{schema_validators → schema_validator}/enumable.rb +0 -0
- /data/lib/openapi_parser/{schema_validators → schema_validator}/float_validator.rb +0 -0
- /data/lib/openapi_parser/{schema_validators → schema_validator}/integer_validator.rb +0 -0
- /data/lib/openapi_parser/{schema_validators → schema_validator}/minimum_maximum.rb +0 -0
- /data/lib/openapi_parser/{schema_validators → schema_validator}/nil_validator.rb +0 -0
- /data/lib/openapi_parser/{schema_validators → schema_validator}/object_validator.rb +0 -0
- /data/lib/openapi_parser/{schema_validators → schema_validator}/options.rb +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 00f123cd8511ebd3cbe2f48ec901285d591a93ac1a56d2693f2ba896aebdf076
|
|
4
|
+
data.tar.gz: 263634fb1891c2fae9756c64e3fb0d0b3832484aced219b6091a7af9db3e6793
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f58453f7daa0e73156cd221e1027cd7da7ecb8e63ce13fdee538c544380a763fa6c1b1de52e6a3a191e0f54c4fbde2ba1fd747d88ec5418a25075adcb1f246f
|
|
7
|
+
data.tar.gz: 9ebff3ee048466e02918cc6993de56147b640903418a1fbff9a6669a277c72954541c441bc2f7acdfff555ee4765c4392e7c3e7367235caff7774db01048f1ea
|
data/.github/workflows/ci.yaml
CHANGED
|
@@ -5,8 +5,15 @@ jobs:
|
|
|
5
5
|
strategy:
|
|
6
6
|
fail-fast: false
|
|
7
7
|
matrix:
|
|
8
|
-
os:
|
|
9
|
-
|
|
8
|
+
os:
|
|
9
|
+
- ubuntu-latest
|
|
10
|
+
- macos-latest
|
|
11
|
+
ruby:
|
|
12
|
+
- "2.7"
|
|
13
|
+
- "3.0"
|
|
14
|
+
- "3.1"
|
|
15
|
+
- "3.2"
|
|
16
|
+
- ruby-head
|
|
10
17
|
runs-on: ${{ matrix.os }}
|
|
11
18
|
steps:
|
|
12
19
|
- uses: actions/checkout@v2
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0
|
|
1
|
+
3.1.0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
## Unreleased
|
|
2
2
|
|
|
3
|
+
## 1.1.0 (2023-10-15)
|
|
4
|
+
### Added
|
|
5
|
+
* Support for uniqueItems in array #154
|
|
6
|
+
* Fix nullable field does not work with allOf, anyOf and oneOf keyword #128
|
|
7
|
+
* drop ruby 2.6 #158
|
|
8
|
+
|
|
9
|
+
## 1.0.0 (2021-02-03)
|
|
10
|
+
### Added
|
|
11
|
+
* Add date-time format validation #126
|
|
12
|
+
|
|
3
13
|
## 1.0.0.beta1 (2021-12-15)
|
|
4
14
|
### Added
|
|
5
15
|
* Add strict_reference_validation config and implementation to address/implement #29 #123
|
data/Rakefile
CHANGED
data/Steepfile
CHANGED
|
@@ -4,8 +4,8 @@ target :lib do
|
|
|
4
4
|
|
|
5
5
|
check "lib/openapi_parser.rb"
|
|
6
6
|
check "lib/openapi_parser/config.rb"
|
|
7
|
-
check "lib/openapi_parser/
|
|
8
|
-
check "lib/openapi_parser/
|
|
7
|
+
check "lib/openapi_parser/schema_validator/options.rb"
|
|
8
|
+
check "lib/openapi_parser/schema_validator/base.rb"
|
|
9
9
|
|
|
10
|
-
library 'uri'
|
|
10
|
+
library 'uri', 'json', 'pathname'
|
|
11
11
|
end
|
|
@@ -206,6 +206,17 @@ module OpenAPIParser
|
|
|
206
206
|
end
|
|
207
207
|
end
|
|
208
208
|
|
|
209
|
+
class InvalidDateTimeFormat < OpenAPIError
|
|
210
|
+
def initialize(value, reference)
|
|
211
|
+
super(reference)
|
|
212
|
+
@value = value
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
def message
|
|
216
|
+
"#{@reference} Value: #{@value.inspect} is not conformant with date-time format"
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
209
220
|
class NotExistStatusCodeDefinition < OpenAPIError
|
|
210
221
|
def message
|
|
211
222
|
"#{@reference} status code definition does not exist"
|
|
@@ -261,4 +272,15 @@ module OpenAPIParser
|
|
|
261
272
|
"#{@reference} #{@value.inspect} contains fewer than min items"
|
|
262
273
|
end
|
|
263
274
|
end
|
|
275
|
+
|
|
276
|
+
class NotUniqueItems < OpenAPIError
|
|
277
|
+
def initialize(value, reference)
|
|
278
|
+
super(reference)
|
|
279
|
+
@value = value
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
def message
|
|
283
|
+
"#{@reference} #{@value.inspect} contains duplicate items"
|
|
284
|
+
end
|
|
285
|
+
end
|
|
264
286
|
end
|
|
@@ -5,6 +5,10 @@ class OpenAPIParser::SchemaValidator
|
|
|
5
5
|
# @param [Object] value
|
|
6
6
|
# @param [OpenAPIParser::Schemas::Schema] schema
|
|
7
7
|
def coerce_and_validate(value, schema, **keyword_args)
|
|
8
|
+
if value.nil? && schema.nullable
|
|
9
|
+
return [value, nil]
|
|
10
|
+
end
|
|
11
|
+
|
|
8
12
|
# if any schema return error, it's not valida all of value
|
|
9
13
|
remaining_keys = value.kind_of?(Hash) ? value.keys : []
|
|
10
14
|
nested_additional_properties = false
|
|
@@ -3,6 +3,9 @@ class OpenAPIParser::SchemaValidator
|
|
|
3
3
|
# @param [Object] value
|
|
4
4
|
# @param [OpenAPIParser::Schemas::Schema] schema
|
|
5
5
|
def coerce_and_validate(value, schema, **_keyword_args)
|
|
6
|
+
if value.nil? && schema.nullable
|
|
7
|
+
return [value, nil]
|
|
8
|
+
end
|
|
6
9
|
if schema.discriminator
|
|
7
10
|
return validate_discriminator_schema(schema.discriminator, value)
|
|
8
11
|
end
|
|
@@ -8,6 +8,9 @@ class OpenAPIParser::SchemaValidator
|
|
|
8
8
|
value, err = validate_max_min_items(value, schema)
|
|
9
9
|
return [nil, err] if err
|
|
10
10
|
|
|
11
|
+
value, err = validate_unique_items(value, schema)
|
|
12
|
+
return [nil, err] if err
|
|
13
|
+
|
|
11
14
|
# array type have an schema in items property
|
|
12
15
|
items_schema = schema.items
|
|
13
16
|
coerced_values = value.map do |v|
|
|
@@ -28,5 +31,11 @@ class OpenAPIParser::SchemaValidator
|
|
|
28
31
|
|
|
29
32
|
[value, nil]
|
|
30
33
|
end
|
|
34
|
+
|
|
35
|
+
def validate_unique_items(value, schema)
|
|
36
|
+
return [nil, OpenAPIParser::NotUniqueItems.new(value, schema.object_reference)] if schema.uniqueItems && value.length != value.uniq.length
|
|
37
|
+
|
|
38
|
+
[value, nil]
|
|
39
|
+
end
|
|
31
40
|
end
|
|
32
41
|
end
|
|
@@ -14,7 +14,7 @@ class OpenAPIParser::SchemaValidator
|
|
|
14
14
|
|
|
15
15
|
def validate_discriminator_schema(discriminator, value, parent_discriminator_schemas: [])
|
|
16
16
|
property_name = discriminator.property_name
|
|
17
|
-
|
|
17
|
+
if property_name.nil? || !value.key?(property_name)
|
|
18
18
|
return [nil, OpenAPIParser::NotExistDiscriminatorPropertyName.new(discriminator.property_name, value, discriminator.object_reference)]
|
|
19
19
|
end
|
|
20
20
|
mapping_key = value[property_name]
|
|
@@ -3,6 +3,9 @@ class OpenAPIParser::SchemaValidator
|
|
|
3
3
|
# @param [Object] value
|
|
4
4
|
# @param [OpenAPIParser::Schemas::Schema] schema
|
|
5
5
|
def coerce_and_validate(value, schema, **_keyword_args)
|
|
6
|
+
if value.nil? && schema.nullable
|
|
7
|
+
return [value, nil]
|
|
8
|
+
end
|
|
6
9
|
if schema.discriminator
|
|
7
10
|
return validate_discriminator_schema(schema.discriminator, value)
|
|
8
11
|
end
|
|
@@ -16,11 +16,6 @@ class OpenAPIParser::SchemaValidator
|
|
|
16
16
|
value, err = pattern_validate(value, schema)
|
|
17
17
|
return [nil, err] if err
|
|
18
18
|
|
|
19
|
-
unless @datetime_coerce_class.nil?
|
|
20
|
-
value, err = coerce_date_time(value, schema)
|
|
21
|
-
return [nil, err] if err
|
|
22
|
-
end
|
|
23
|
-
|
|
24
19
|
value, err = validate_max_min_length(value, schema)
|
|
25
20
|
return [nil, err] if err
|
|
26
21
|
|
|
@@ -33,28 +28,14 @@ class OpenAPIParser::SchemaValidator
|
|
|
33
28
|
value, err = validate_date_format(value, schema)
|
|
34
29
|
return [nil, err] if err
|
|
35
30
|
|
|
31
|
+
value, err = validate_datetime_format(value, schema)
|
|
32
|
+
return [nil, err] if err
|
|
33
|
+
|
|
36
34
|
[value, nil]
|
|
37
35
|
end
|
|
38
36
|
|
|
39
37
|
private
|
|
40
38
|
|
|
41
|
-
# @param [OpenAPIParser::Schemas::Schema] schema
|
|
42
|
-
def coerce_date_time(value, schema)
|
|
43
|
-
return parse_date_time(value, schema) if schema.format == 'date-time'
|
|
44
|
-
|
|
45
|
-
[value, nil]
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
def parse_date_time(value, schema)
|
|
49
|
-
begin
|
|
50
|
-
return @datetime_coerce_class.parse(value), nil
|
|
51
|
-
rescue ArgumentError => e
|
|
52
|
-
raise e unless e.message =~ /invalid date/
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
OpenAPIParser::ValidateError.build_error_result(value, schema)
|
|
56
|
-
end
|
|
57
|
-
|
|
58
39
|
# @param [OpenAPIParser::Schemas::Schema] schema
|
|
59
40
|
def pattern_validate(value, schema)
|
|
60
41
|
# pattern support string only so put this
|
|
@@ -101,5 +82,27 @@ class OpenAPIParser::SchemaValidator
|
|
|
101
82
|
|
|
102
83
|
return [value, nil]
|
|
103
84
|
end
|
|
85
|
+
|
|
86
|
+
def validate_datetime_format(value, schema)
|
|
87
|
+
return [value, nil] unless schema.format == 'date-time'
|
|
88
|
+
|
|
89
|
+
begin
|
|
90
|
+
if @datetime_coerce_class.nil?
|
|
91
|
+
# validate only
|
|
92
|
+
DateTime.rfc3339(value)
|
|
93
|
+
[value, nil]
|
|
94
|
+
else
|
|
95
|
+
# validate and coerce
|
|
96
|
+
if @datetime_coerce_class == Time
|
|
97
|
+
[DateTime.rfc3339(value).to_time, nil]
|
|
98
|
+
else
|
|
99
|
+
[@datetime_coerce_class.rfc3339(value), nil]
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
rescue ArgumentError
|
|
103
|
+
# when rfc3339(value) failed
|
|
104
|
+
[nil, OpenAPIParser::InvalidDateTimeFormat.new(value, schema.object_reference)]
|
|
105
|
+
end
|
|
106
|
+
end
|
|
104
107
|
end
|
|
105
108
|
end
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
require_relative '
|
|
2
|
-
require_relative '
|
|
3
|
-
require_relative '
|
|
4
|
-
require_relative '
|
|
5
|
-
require_relative '
|
|
6
|
-
require_relative '
|
|
7
|
-
require_relative '
|
|
8
|
-
require_relative '
|
|
9
|
-
require_relative '
|
|
10
|
-
require_relative '
|
|
11
|
-
require_relative '
|
|
12
|
-
require_relative '
|
|
13
|
-
require_relative '
|
|
14
|
-
require_relative '
|
|
15
|
-
require_relative '
|
|
1
|
+
require_relative 'schema_validator/options'
|
|
2
|
+
require_relative 'schema_validator/enumable'
|
|
3
|
+
require_relative 'schema_validator/minimum_maximum'
|
|
4
|
+
require_relative 'schema_validator/base'
|
|
5
|
+
require_relative 'schema_validator/string_validator'
|
|
6
|
+
require_relative 'schema_validator/integer_validator'
|
|
7
|
+
require_relative 'schema_validator/float_validator'
|
|
8
|
+
require_relative 'schema_validator/boolean_validator'
|
|
9
|
+
require_relative 'schema_validator/object_validator'
|
|
10
|
+
require_relative 'schema_validator/array_validator'
|
|
11
|
+
require_relative 'schema_validator/any_of_validator'
|
|
12
|
+
require_relative 'schema_validator/all_of_validator'
|
|
13
|
+
require_relative 'schema_validator/one_of_validator'
|
|
14
|
+
require_relative 'schema_validator/nil_validator'
|
|
15
|
+
require_relative 'schema_validator/unspecified_type_validator'
|
|
16
16
|
|
|
17
17
|
class OpenAPIParser::SchemaValidator
|
|
18
18
|
# validate value by schema
|
|
@@ -29,6 +29,10 @@ module OpenAPIParser::Schemas
|
|
|
29
29
|
# @return [Components, nil]
|
|
30
30
|
openapi_attr_object :components, Components, reference: false
|
|
31
31
|
|
|
32
|
+
# @!attribute [r] info
|
|
33
|
+
# @return [Info, nil]
|
|
34
|
+
openapi_attr_object :info, Info, reference: false
|
|
35
|
+
|
|
32
36
|
# @return [OpenAPIParser::RequestOperation, nil]
|
|
33
37
|
def request_operation(http_method, request_path)
|
|
34
38
|
OpenAPIParser::RequestOperation.create(http_method, request_path, @path_item_finder, @config)
|
data/lib/openapi_parser.rb
CHANGED
|
@@ -43,13 +43,16 @@ module OpenAPIParser
|
|
|
43
43
|
def load_uri(uri, config:, schema_registry:)
|
|
44
44
|
# Open-uri doesn't open file scheme uri, so we try to open file path directly
|
|
45
45
|
# File scheme uri which points to a remote file is not supported.
|
|
46
|
+
uri_path = uri.path
|
|
47
|
+
raise "file not found" if uri_path.nil?
|
|
48
|
+
|
|
46
49
|
content = if uri.scheme == 'file'
|
|
47
|
-
open(
|
|
50
|
+
open(uri_path)&.read
|
|
48
51
|
elsif uri.is_a?(OpenURI::OpenRead)
|
|
49
52
|
uri.open()&.read
|
|
50
53
|
end
|
|
51
54
|
|
|
52
|
-
extension = Pathname.new(
|
|
55
|
+
extension = Pathname.new(uri_path).extname
|
|
53
56
|
load_hash(parse_file(content, extension), config: config, uri: uri, schema_registry: schema_registry)
|
|
54
57
|
end
|
|
55
58
|
|
|
@@ -85,6 +88,7 @@ module OpenAPIParser
|
|
|
85
88
|
end
|
|
86
89
|
|
|
87
90
|
def parse_json(content)
|
|
91
|
+
raise "json content is nil" unless content
|
|
88
92
|
JSON.parse(content)
|
|
89
93
|
end
|
|
90
94
|
|
data/openapi_parser.gemspec
CHANGED
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
|
12
12
|
spec.description = 'parser for OpenAPI 3.0 or later'
|
|
13
13
|
spec.homepage = 'https://github.com/ota42y/openapi_parser'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
|
-
spec.required_ruby_version = ">= 2.
|
|
15
|
+
spec.required_ruby_version = ">= 2.7.0"
|
|
16
16
|
|
|
17
17
|
# Specify which files should be added to the gem when it is released.
|
|
18
18
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
@@ -25,11 +25,17 @@ Gem::Specification.new do |spec|
|
|
|
25
25
|
|
|
26
26
|
spec.add_development_dependency 'bundler', '>= 1.16'
|
|
27
27
|
spec.add_development_dependency 'fincop'
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
|
|
29
|
+
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("3.2.0")
|
|
30
|
+
spec.add_development_dependency 'pry', '~> 0.12.0'
|
|
31
|
+
spec.add_development_dependency 'pry-byebug'
|
|
32
|
+
end
|
|
30
33
|
spec.add_development_dependency 'rake', '>= 12.3.3'
|
|
31
34
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
32
35
|
spec.add_development_dependency 'rspec-parameterized'
|
|
33
36
|
spec.add_development_dependency 'simplecov'
|
|
34
37
|
spec.add_development_dependency "steep"
|
|
38
|
+
# for steep
|
|
39
|
+
# https://github.com/soutaro/steep/issues/466
|
|
40
|
+
spec.add_development_dependency "activesupport", '~> 6.0'
|
|
35
41
|
end
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
module OpenAPIParser
|
|
3
3
|
class Config
|
|
4
4
|
@config: untyped
|
|
5
|
+
@request_validator_options: OpenAPIParser::SchemaValidator::Options
|
|
6
|
+
@response_validate_options: OpenAPIParser::SchemaValidator::ResponseValidateOptions
|
|
5
7
|
alias request_body_options request_validator_options
|
|
6
8
|
alias path_params_options request_validator_options
|
|
7
9
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module OpenAPIParser
|
|
2
|
+
class OpenAPIError < StandardError
|
|
3
|
+
def initialize: (untyped reference) -> untyped
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
class ValidateError < OpenAPIError
|
|
7
|
+
def initialize: (untyped data, (String | nil) type, untyped reference) -> untyped
|
|
8
|
+
def message: -> String
|
|
9
|
+
|
|
10
|
+
def self.build_error_result: (Object value, OpenAPIParser::Schemas::Schema schema) -> [nil, OpenAPIParser::ValidateError]
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
class NotExistDiscriminatorMappedSchema < OpenAPIError
|
|
14
|
+
def initialize: (untyped mapped_schema_reference, untyped reference) -> untyped
|
|
15
|
+
def message: -> String
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
class NotExistDiscriminatorPropertyName < OpenAPIError
|
|
19
|
+
def initialize: (untyped mapped_schema_reference, untyped value, untyped reference) -> untyped
|
|
20
|
+
def message: -> String
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -4,14 +4,15 @@ module OpenAPIParser
|
|
|
4
4
|
class Base
|
|
5
5
|
@coerce_value: bool | nil
|
|
6
6
|
|
|
7
|
-
def initialize: (OpenAPIParser::SchemaValidator::Validatable validatable, (bool | nil) coerce_value) -> untyped
|
|
8
7
|
attr_reader validatable: OpenAPIParser::SchemaValidator::Validatable
|
|
9
|
-
|
|
8
|
+
|
|
9
|
+
def initialize: (OpenAPIParser::SchemaValidator::Validatable validatable, (bool | nil) coerce_value) -> untyped
|
|
10
|
+
def coerce_and_validate: (Object _value, OpenAPIParser::Schemas::Schema _schema, **untyped) -> [untyped, (ValidateError | NotExistDiscriminatorMappedSchema | nil)]
|
|
10
11
|
def validate_discriminator_schema: (
|
|
11
12
|
OpenAPIParser::Schemas::Discriminator discriminator,
|
|
12
13
|
Hash[String, bot] value,
|
|
13
14
|
?parent_discriminator_schemas: Array[OpenAPIParser::Schemas::Schema]
|
|
14
|
-
) -> [Object | nil, OpenAPIParser::
|
|
15
|
+
) -> [Object | nil, OpenAPIParser::OpenAPIError]
|
|
15
16
|
end
|
|
16
17
|
end
|
|
17
18
|
end
|
data/sig/types.rbs
CHANGED
data/sig/wip_types.rbs
CHANGED
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:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ota42y
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-10-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -38,34 +38,6 @@ 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'
|
|
69
41
|
- !ruby/object:Gem::Dependency
|
|
70
42
|
name: rake
|
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -136,6 +108,20 @@ dependencies:
|
|
|
136
108
|
- - ">="
|
|
137
109
|
- !ruby/object:Gem::Version
|
|
138
110
|
version: '0'
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: activesupport
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - "~>"
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: '6.0'
|
|
118
|
+
type: :development
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - "~>"
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: '6.0'
|
|
139
125
|
description: parser for OpenAPI 3.0 or later
|
|
140
126
|
email:
|
|
141
127
|
- ota42y@gmail.com
|
|
@@ -186,27 +172,28 @@ files:
|
|
|
186
172
|
- lib/openapi_parser/reference_expander.rb
|
|
187
173
|
- lib/openapi_parser/request_operation.rb
|
|
188
174
|
- lib/openapi_parser/schema_validator.rb
|
|
189
|
-
- lib/openapi_parser/
|
|
190
|
-
- lib/openapi_parser/
|
|
191
|
-
- lib/openapi_parser/
|
|
192
|
-
- lib/openapi_parser/
|
|
193
|
-
- lib/openapi_parser/
|
|
194
|
-
- lib/openapi_parser/
|
|
195
|
-
- lib/openapi_parser/
|
|
196
|
-
- lib/openapi_parser/
|
|
197
|
-
- lib/openapi_parser/
|
|
198
|
-
- lib/openapi_parser/
|
|
199
|
-
- lib/openapi_parser/
|
|
200
|
-
- lib/openapi_parser/
|
|
201
|
-
- lib/openapi_parser/
|
|
202
|
-
- lib/openapi_parser/
|
|
203
|
-
- lib/openapi_parser/
|
|
175
|
+
- lib/openapi_parser/schema_validator/all_of_validator.rb
|
|
176
|
+
- lib/openapi_parser/schema_validator/any_of_validator.rb
|
|
177
|
+
- lib/openapi_parser/schema_validator/array_validator.rb
|
|
178
|
+
- lib/openapi_parser/schema_validator/base.rb
|
|
179
|
+
- lib/openapi_parser/schema_validator/boolean_validator.rb
|
|
180
|
+
- lib/openapi_parser/schema_validator/enumable.rb
|
|
181
|
+
- lib/openapi_parser/schema_validator/float_validator.rb
|
|
182
|
+
- lib/openapi_parser/schema_validator/integer_validator.rb
|
|
183
|
+
- lib/openapi_parser/schema_validator/minimum_maximum.rb
|
|
184
|
+
- lib/openapi_parser/schema_validator/nil_validator.rb
|
|
185
|
+
- lib/openapi_parser/schema_validator/object_validator.rb
|
|
186
|
+
- lib/openapi_parser/schema_validator/one_of_validator.rb
|
|
187
|
+
- lib/openapi_parser/schema_validator/options.rb
|
|
188
|
+
- lib/openapi_parser/schema_validator/string_validator.rb
|
|
189
|
+
- lib/openapi_parser/schema_validator/unspecified_type_validator.rb
|
|
204
190
|
- lib/openapi_parser/schemas.rb
|
|
205
191
|
- lib/openapi_parser/schemas/base.rb
|
|
206
192
|
- lib/openapi_parser/schemas/classes.rb
|
|
207
193
|
- lib/openapi_parser/schemas/components.rb
|
|
208
194
|
- lib/openapi_parser/schemas/discriminator.rb
|
|
209
195
|
- lib/openapi_parser/schemas/header.rb
|
|
196
|
+
- lib/openapi_parser/schemas/info.rb
|
|
210
197
|
- lib/openapi_parser/schemas/media_type.rb
|
|
211
198
|
- lib/openapi_parser/schemas/openapi.rb
|
|
212
199
|
- lib/openapi_parser/schemas/operation.rb
|
|
@@ -222,6 +209,8 @@ files:
|
|
|
222
209
|
- openapi_parser.gemspec
|
|
223
210
|
- sig/openapi_parser.rbs
|
|
224
211
|
- sig/openapi_parser/config.rbs
|
|
212
|
+
- sig/openapi_parser/errors.rbs
|
|
213
|
+
- sig/openapi_parser/reference_expander.rbs
|
|
225
214
|
- sig/openapi_parser/schema_validator.rbs
|
|
226
215
|
- sig/openapi_parser/schema_validators/base.rbs
|
|
227
216
|
- sig/openapi_parser/schema_validators/options.rbs
|
|
@@ -233,7 +222,7 @@ homepage: https://github.com/ota42y/openapi_parser
|
|
|
233
222
|
licenses:
|
|
234
223
|
- MIT
|
|
235
224
|
metadata: {}
|
|
236
|
-
post_install_message:
|
|
225
|
+
post_install_message:
|
|
237
226
|
rdoc_options: []
|
|
238
227
|
require_paths:
|
|
239
228
|
- lib
|
|
@@ -241,15 +230,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
241
230
|
requirements:
|
|
242
231
|
- - ">="
|
|
243
232
|
- !ruby/object:Gem::Version
|
|
244
|
-
version: 2.
|
|
233
|
+
version: 2.7.0
|
|
245
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
235
|
requirements:
|
|
247
|
-
- - "
|
|
236
|
+
- - ">="
|
|
248
237
|
- !ruby/object:Gem::Version
|
|
249
|
-
version:
|
|
238
|
+
version: '0'
|
|
250
239
|
requirements: []
|
|
251
|
-
rubygems_version: 3.
|
|
252
|
-
signing_key:
|
|
240
|
+
rubygems_version: 3.4.20
|
|
241
|
+
signing_key:
|
|
253
242
|
specification_version: 4
|
|
254
243
|
summary: OpenAPI3 parser
|
|
255
244
|
test_files: []
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|