openapi3_parser 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -0
  3. data/CHANGELOG.md +7 -0
  4. data/lib/openapi3_parser.rb +3 -4
  5. data/lib/openapi3_parser/context.rb +0 -2
  6. data/lib/openapi3_parser/context/location.rb +0 -2
  7. data/lib/openapi3_parser/document.rb +0 -9
  8. data/lib/openapi3_parser/document/reference_register.rb +0 -2
  9. data/lib/openapi3_parser/node/array.rb +0 -2
  10. data/lib/openapi3_parser/node/object.rb +0 -2
  11. data/lib/openapi3_parser/node/openapi.rb +0 -1
  12. data/lib/openapi3_parser/node_factory/array.rb +0 -6
  13. data/lib/openapi3_parser/node_factory/callback.rb +0 -3
  14. data/lib/openapi3_parser/node_factory/components.rb +0 -14
  15. data/lib/openapi3_parser/node_factory/contact.rb +2 -3
  16. data/lib/openapi3_parser/node_factory/discriminator.rb +0 -1
  17. data/lib/openapi3_parser/node_factory/encoding.rb +0 -4
  18. data/lib/openapi3_parser/node_factory/example.rb +1 -2
  19. data/lib/openapi3_parser/node_factory/external_documentation.rb +0 -1
  20. data/lib/openapi3_parser/node_factory/field.rb +0 -4
  21. data/lib/openapi3_parser/node_factory/fields/reference.rb +0 -3
  22. data/lib/openapi3_parser/node_factory/header.rb +1 -2
  23. data/lib/openapi3_parser/node_factory/info.rb +3 -4
  24. data/lib/openapi3_parser/node_factory/license.rb +1 -2
  25. data/lib/openapi3_parser/node_factory/link.rb +0 -3
  26. data/lib/openapi3_parser/node_factory/map.rb +0 -8
  27. data/lib/openapi3_parser/node_factory/media_type.rb +0 -6
  28. data/lib/openapi3_parser/node_factory/oauth_flow.rb +0 -1
  29. data/lib/openapi3_parser/node_factory/oauth_flows.rb +0 -3
  30. data/lib/openapi3_parser/node_factory/object.rb +0 -3
  31. data/lib/openapi3_parser/node_factory/object_factory/dsl.rb +12 -8
  32. data/lib/openapi3_parser/node_factory/object_factory/field_config.rb +0 -3
  33. data/lib/openapi3_parser/node_factory/object_factory/node_builder.rb +0 -4
  34. data/lib/openapi3_parser/node_factory/object_factory/validator.rb +0 -7
  35. data/lib/openapi3_parser/node_factory/openapi.rb +0 -5
  36. data/lib/openapi3_parser/node_factory/operation.rb +0 -10
  37. data/lib/openapi3_parser/node_factory/optional_reference.rb +0 -2
  38. data/lib/openapi3_parser/node_factory/parameter.rb +1 -4
  39. data/lib/openapi3_parser/node_factory/parameter_like.rb +0 -5
  40. data/lib/openapi3_parser/node_factory/path_item.rb +0 -9
  41. data/lib/openapi3_parser/node_factory/paths.rb +0 -3
  42. data/lib/openapi3_parser/node_factory/reference.rb +0 -3
  43. data/lib/openapi3_parser/node_factory/request_body.rb +0 -6
  44. data/lib/openapi3_parser/node_factory/response.rb +0 -10
  45. data/lib/openapi3_parser/node_factory/responses.rb +0 -4
  46. data/lib/openapi3_parser/node_factory/schema.rb +0 -7
  47. data/lib/openapi3_parser/node_factory/security_requirement.rb +0 -2
  48. data/lib/openapi3_parser/node_factory/security_scheme.rb +0 -3
  49. data/lib/openapi3_parser/node_factory/server.rb +0 -3
  50. data/lib/openapi3_parser/node_factory/server_variable.rb +0 -2
  51. data/lib/openapi3_parser/node_factory/tag.rb +0 -1
  52. data/lib/openapi3_parser/node_factory/type_checker.rb +0 -3
  53. data/lib/openapi3_parser/node_factory/xml.rb +1 -2
  54. data/lib/openapi3_parser/source.rb +0 -4
  55. data/lib/openapi3_parser/source/reference.rb +0 -3
  56. data/lib/openapi3_parser/source/reference_resolver.rb +0 -3
  57. data/lib/openapi3_parser/source_input.rb +0 -2
  58. data/lib/openapi3_parser/source_input/file.rb +0 -3
  59. data/lib/openapi3_parser/source_input/raw.rb +0 -2
  60. data/lib/openapi3_parser/source_input/resolve_next.rb +0 -3
  61. data/lib/openapi3_parser/source_input/string_parser.rb +1 -1
  62. data/lib/openapi3_parser/source_input/url.rb +0 -3
  63. data/lib/openapi3_parser/validation/validatable.rb +0 -3
  64. data/lib/openapi3_parser/validators/mutually_exclusive_fields.rb +0 -1
  65. data/lib/openapi3_parser/validators/required_fields.rb +0 -1
  66. data/lib/openapi3_parser/validators/unexpected_fields.rb +0 -1
  67. data/lib/openapi3_parser/version.rb +1 -1
  68. data/openapi3_parser.gemspec +1 -0
  69. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b49ddc5e4db7f288ea2c27f4cbdd40642b86b037
4
- data.tar.gz: 3c391e226bf011a8e1c4b726201ea82b594b1112
3
+ metadata.gz: dc74c9c6170cb4f0bd73f5debc10b7a53317c3f4
4
+ data.tar.gz: ffd75a8d5d5ff4d1f40493331645db2785810eb6
5
5
  SHA512:
6
- metadata.gz: 5bb0981638b6f39307638fafa63a2cb184eb09117063cdba579d350e3fc369f433646c73f7d324ada7a06e947d69550be601ca2c8fda89297470de9c9360c0da
7
- data.tar.gz: c9867350e4f9253ee0b18d1d97a9a4b67bf1cb6b7081957fe650caad86e915ff9956941be6a18ffdfad800d0fd5fd562a801e7a6d9e8bb5ed37d608c921e879e
6
+ metadata.gz: a9c5641522434bb630c27679dcf7a9a93ab3c538e7cbc45597e84f72ba8cdb3ed7d6477cdeee3623becda92a02fa118073e7dcac61780a5d6bab112a763fd75f
7
+ data.tar.gz: 07b6ad8941ab2a02b210a25f278287cd7d29f3025b529d540e9fd5ff973e6d51938e2618b085eb3970e79757f21dca9629d6bd4c472f77f29b24493b82c6cb85
data/.rspec CHANGED
@@ -1 +1,2 @@
1
1
  --require spec_helper
2
+ --warnings
@@ -1,3 +1,10 @@
1
+ # 0.5.2
2
+
3
+ - Fix outputting warnings for cyclic dependencies and undefined variables -
4
+ fixes: https://github.com/kevindew/openapi3_parser/issues/6
5
+ - Add Date and Time to YAML safe classes so library doesn't crash on an
6
+ unquoted timestamp - fixes: https://github.com/kevindew/openapi3_parser/issues/7
7
+
1
8
  # 0.5.1
2
9
 
3
10
  - Bugfix for allowing maps to have extension like field names
@@ -1,9 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/document"
4
- require "openapi3_parser/source_input/raw"
5
- require "openapi3_parser/source_input/file"
6
- require "openapi3_parser/source_input/url"
3
+ Dir.glob(File.join(__dir__, "openapi3_parser", "**", "*.rb")).each do |file|
4
+ require file
5
+ end
7
6
 
8
7
  module Openapi3Parser
9
8
  # For a variety of inputs this will construct an OpenAPI document. For a
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/context/location"
4
-
5
3
  module Openapi3Parser
6
4
  # Context is a construct used in both the node factories and the nodes
7
5
  # themselves. It is used to represent the data, and the source of it, that
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/context/pointer"
4
-
5
3
  module Openapi3Parser
6
4
  class Context
7
5
  # Class used to represent a location within an OpenAPI document.
@@ -1,14 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/cautious_dig"
4
- require "openapi3_parser/context"
5
- require "openapi3_parser/context/pointer"
6
- require "openapi3_parser/document/reference_register"
7
- require "openapi3_parser/error"
8
- require "openapi3_parser/node_factory/openapi"
9
- require "openapi3_parser/source"
10
- require "openapi3_parser/validation/error_collection"
11
-
12
3
  require "forwardable"
13
4
 
14
5
  module Openapi3Parser
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/error"
4
-
5
3
  module Openapi3Parser
6
4
  class Document
7
5
  class ReferenceRegister
@@ -2,8 +2,6 @@
2
2
 
3
3
  require "forwardable"
4
4
 
5
- require "openapi3_parser/node/map"
6
-
7
5
  module Openapi3Parser
8
6
  module Node
9
7
  # An array within a OpenAPI document.
@@ -2,8 +2,6 @@
2
2
 
3
3
  require "forwardable"
4
4
 
5
- require "openapi3_parser/markdown"
6
-
7
5
  module Openapi3Parser
8
6
  module Node
9
7
  class Object
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "openapi3_parser/node/object"
4
- require "openapi3_parser/node/components"
5
4
 
6
5
  module Openapi3Parser
7
6
  module Node
@@ -1,11 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/context"
4
- require "openapi3_parser/node_factory"
5
- require "openapi3_parser/node_factory/type_checker"
6
- require "openapi3_parser/node/array"
7
- require "openapi3_parser/validation/validatable"
8
-
9
3
  module Openapi3Parser
10
4
  module NodeFactory
11
5
  class Array
@@ -1,9 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/context"
4
3
  require "openapi3_parser/node_factory/map"
5
- require "openapi3_parser/node_factory/path_item"
6
- require "openapi3_parser/node/callback"
7
4
 
8
5
  module Openapi3Parser
9
6
  module NodeFactory
@@ -1,20 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/components"
4
3
  require "openapi3_parser/node_factory/object"
5
- require "openapi3_parser/node_factory/optional_reference"
6
- require "openapi3_parser/node_factory/map"
7
- require "openapi3_parser/node_factory/schema"
8
- require "openapi3_parser/node_factory/response"
9
- require "openapi3_parser/node_factory/parameter"
10
- require "openapi3_parser/node_factory/example"
11
- require "openapi3_parser/node_factory/request_body"
12
- require "openapi3_parser/node_factory/header"
13
- require "openapi3_parser/node_factory/security_scheme"
14
- require "openapi3_parser/node_factory/link"
15
- require "openapi3_parser/node_factory/callback"
16
- require "openapi3_parser/validation/input_validator"
17
- require "openapi3_parser/validators/component_keys"
18
4
 
19
5
  module Openapi3Parser
20
6
  module NodeFactory
@@ -1,10 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/contact"
4
3
  require "openapi3_parser/node_factory/object"
5
- require "openapi3_parser/validators/url"
6
- require "openapi3_parser/validators/email"
7
4
  require "openapi3_parser/validation/input_validator"
5
+ require "openapi3_parser/validators/email"
6
+ require "openapi3_parser/validators/url"
8
7
 
9
8
  module Openapi3Parser
10
9
  module NodeFactory
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/discriminator"
4
3
  require "openapi3_parser/node_factory/object"
5
4
 
6
5
  module Openapi3Parser
@@ -1,10 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/encoding"
4
- require "openapi3_parser/node_factory/map"
5
3
  require "openapi3_parser/node_factory/object"
6
- require "openapi3_parser/node_factory/optional_reference"
7
- require "openapi3_parser/node_factory/header"
8
4
 
9
5
  module Openapi3Parser
10
6
  module NodeFactory
@@ -1,9 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/example"
4
3
  require "openapi3_parser/node_factory/object"
5
- require "openapi3_parser/validators/url"
6
4
  require "openapi3_parser/validation/input_validator"
5
+ require "openapi3_parser/validators/url"
7
6
 
8
7
  module Openapi3Parser
9
8
  module NodeFactory
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/external_documentation"
4
3
  require "openapi3_parser/node_factory/object"
5
4
  require "openapi3_parser/validation/input_validator"
6
5
  require "openapi3_parser/validators/url"
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node_factory"
4
- require "openapi3_parser/node_factory/type_checker"
5
- require "openapi3_parser/validation/validatable"
6
-
7
3
  module Openapi3Parser
8
4
  module NodeFactory
9
5
  class Field
@@ -1,10 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "forwardable"
4
-
5
- require "openapi3_parser/context"
6
4
  require "openapi3_parser/node_factory/field"
7
- require "openapi3_parser/validators/reference"
8
5
 
9
6
  module Openapi3Parser
10
7
  module NodeFactory
@@ -1,8 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/header"
4
- require "openapi3_parser/node_factory/parameter_like"
5
3
  require "openapi3_parser/node_factory/object"
4
+ require "openapi3_parser/node_factory/parameter_like"
6
5
 
7
6
  module Openapi3Parser
8
7
  module NodeFactory
@@ -1,8 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/info"
4
- require "openapi3_parser/node_factory/license"
5
3
  require "openapi3_parser/node_factory/contact"
4
+ require "openapi3_parser/node_factory/license"
6
5
  require "openapi3_parser/node_factory/object"
7
6
  require "openapi3_parser/validation/input_validator"
8
7
  require "openapi3_parser/validators/url"
@@ -16,8 +15,8 @@ module Openapi3Parser
16
15
  field "termsOfService",
17
16
  input_type: String,
18
17
  validate: Validation::InputValidator.new(Validators::Url)
19
- field "contact", factory: Contact
20
- field "license", factory: License
18
+ field "contact", factory: NodeFactory::Contact
19
+ field "license", factory: NodeFactory::License
21
20
  field "version", input_type: String, required: true
22
21
 
23
22
  private
@@ -1,9 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/license"
4
3
  require "openapi3_parser/node_factory/object"
5
- require "openapi3_parser/validators/url"
6
4
  require "openapi3_parser/validation/input_validator"
5
+ require "openapi3_parser/validators/url"
7
6
 
8
7
  module Openapi3Parser
9
8
  module NodeFactory
@@ -1,9 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/license"
4
- require "openapi3_parser/node_factory/map"
5
3
  require "openapi3_parser/node_factory/object"
6
- require "openapi3_parser/node_factory/server"
7
4
 
8
5
  module Openapi3Parser
9
6
  module NodeFactory
@@ -1,13 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/array_sentence"
4
- require "openapi3_parser/context"
5
- require "openapi3_parser/node_factory"
6
- require "openapi3_parser/node_factory/type_checker"
7
- require "openapi3_parser/node/map"
8
- require "openapi3_parser/validation/validatable"
9
- require "openapi3_parser/validators/unexpected_fields"
10
-
11
3
  module Openapi3Parser
12
4
  module NodeFactory
13
5
  class Map
@@ -1,12 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/media_type"
4
- require "openapi3_parser/node_factory/map"
5
3
  require "openapi3_parser/node_factory/object"
6
- require "openapi3_parser/node_factory/optional_reference"
7
- require "openapi3_parser/node_factory/schema"
8
- require "openapi3_parser/node_factory/example"
9
- require "openapi3_parser/node_factory/encoding"
10
4
 
11
5
  module Openapi3Parser
12
6
  module NodeFactory
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/oauth_flow"
4
3
  require "openapi3_parser/node_factory/object"
5
4
 
6
5
  module Openapi3Parser
@@ -1,9 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/oauth_flows"
4
- require "openapi3_parser/node_factory/oauth_flow"
5
3
  require "openapi3_parser/node_factory/object"
6
- require "openapi3_parser/node_factory/optional_reference"
7
4
 
8
5
  module Openapi3Parser
9
6
  module NodeFactory
@@ -1,10 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "forwardable"
4
-
5
- require "openapi3_parser/context"
6
4
  require "openapi3_parser/node_factory/object_factory/dsl"
7
- require "openapi3_parser/node_factory/object_factory/node_builder"
8
5
 
9
6
  module Openapi3Parser
10
7
  module NodeFactory
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "ostruct"
4
-
5
4
  require "openapi3_parser/node_factory/object_factory/field_config"
6
5
 
7
6
  module Openapi3Parser
@@ -14,7 +13,7 @@ module Openapi3Parser
14
13
  end
15
14
 
16
15
  def field_configs
17
- @field_configs || {}
16
+ @field_configs ||= {}
18
17
  end
19
18
 
20
19
  def allow_extensions
@@ -22,27 +21,32 @@ module Openapi3Parser
22
21
  end
23
22
 
24
23
  def allowed_extensions?
25
- @allow_extensions == true
24
+ if instance_variable_defined?(:@allow_extensions)
25
+ @allow_extensions == true
26
+ else
27
+ false
28
+ end
26
29
  end
27
30
 
28
31
  def mutually_exclusive(*fields, required: false)
29
- @mutually_exclusive ||= []
30
- @mutually_exclusive << OpenStruct.new(
32
+ @mutually_exclusive_fields ||= []
33
+ @mutually_exclusive_fields << OpenStruct.new(
31
34
  fields: fields, required: required
32
35
  )
33
36
  end
34
37
 
35
38
  def mutually_exclusive_fields
36
- @mutually_exclusive || []
39
+ @mutually_exclusive_fields ||= []
37
40
  end
38
41
 
39
42
  def validate(*items, &block)
40
- @validations = (@validations || []).concat(items)
43
+ @validations ||= []
44
+ @validations = @validations.concat(items)
41
45
  @validations << block if block
42
46
  end
43
47
 
44
48
  def validations
45
- @validations || []
49
+ @validations ||= []
46
50
  end
47
51
  end
48
52
  end
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/error"
4
- require "openapi3_parser/node_factory/type_checker"
5
-
6
3
  module Openapi3Parser
7
4
  module NodeFactory
8
5
  module ObjectFactory
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node_factory/type_checker"
4
- require "openapi3_parser/node_factory/object_factory/validator"
5
- require "openapi3_parser/node_factory/recursive_pointer"
6
-
7
3
  module Openapi3Parser
8
4
  module NodeFactory
9
5
  module ObjectFactory
@@ -2,13 +2,6 @@
2
2
 
3
3
  require "forwardable"
4
4
 
5
- require "openapi3_parser/array_sentence"
6
- require "openapi3_parser/error"
7
- require "openapi3_parser/validation/validatable"
8
- require "openapi3_parser/validators/mutually_exclusive_fields"
9
- require "openapi3_parser/validators/required_fields"
10
- require "openapi3_parser/validators/unexpected_fields"
11
-
12
5
  module Openapi3Parser
13
6
  module NodeFactory
14
7
  module ObjectFactory
@@ -1,14 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/openapi"
4
3
  require "openapi3_parser/node_factory/object"
5
4
  require "openapi3_parser/node_factory/info"
6
- require "openapi3_parser/node_factory/array"
7
- require "openapi3_parser/node_factory/server"
8
5
  require "openapi3_parser/node_factory/paths"
9
6
  require "openapi3_parser/node_factory/components"
10
- require "openapi3_parser/node_factory/security_requirement"
11
- require "openapi3_parser/node_factory/tag"
12
7
  require "openapi3_parser/node_factory/external_documentation"
13
8
 
14
9
  module Openapi3Parser
@@ -1,18 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/operation"
4
- require "openapi3_parser/node_factory/map"
5
3
  require "openapi3_parser/node_factory/object"
6
- require "openapi3_parser/node_factory/optional_reference"
7
- require "openapi3_parser/node_factory/array"
8
4
  require "openapi3_parser/node_factory/external_documentation"
9
- require "openapi3_parser/node_factory/parameter"
10
- require "openapi3_parser/node_factory/request_body"
11
5
  require "openapi3_parser/node_factory/responses"
12
- require "openapi3_parser/node_factory/callback"
13
- require "openapi3_parser/node_factory/server"
14
- require "openapi3_parser/node_factory/security_requirement"
15
- require "openapi3_parser/validators/duplicate_parameters"
16
6
 
17
7
  module Openapi3Parser
18
8
  module NodeFactory
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node_factory/reference"
4
-
5
3
  module Openapi3Parser
6
4
  module NodeFactory
7
5
  class OptionalReference
@@ -1,10 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/context"
4
- require "openapi3_parser/node/parameter"
5
- require "openapi3_parser/node_factory/parameter_like"
6
3
  require "openapi3_parser/node_factory/object"
7
- require "openapi3_parser/validation/error"
4
+ require "openapi3_parser/node_factory/parameter_like"
8
5
 
9
6
  module Openapi3Parser
10
7
  module NodeFactory
@@ -35,8 +35,3 @@ module Openapi3Parser
35
35
  end
36
36
 
37
37
  # These are in the footer as a cyclic dependency can stop this module loading
38
- require "openapi3_parser/node_factory/optional_reference"
39
- require "openapi3_parser/node_factory/map"
40
- require "openapi3_parser/node_factory/schema"
41
- require "openapi3_parser/node_factory/example"
42
- require "openapi3_parser/node_factory/media_type"
@@ -1,15 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/path_item"
4
- require "openapi3_parser/node_factory/fields/reference"
5
3
  require "openapi3_parser/node_factory/object"
6
- require "openapi3_parser/node_factory/object_factory/node_builder"
7
- require "openapi3_parser/node_factory/optional_reference"
8
- require "openapi3_parser/node_factory/array"
9
- require "openapi3_parser/node_factory/server"
10
- require "openapi3_parser/node_factory/operation"
11
- require "openapi3_parser/node_factory/parameter"
12
- require "openapi3_parser/validators/duplicate_parameters"
13
4
 
14
5
  module Openapi3Parser
15
6
  module NodeFactory
@@ -1,9 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "openapi3_parser/node_factory/map"
4
- require "openapi3_parser/node_factory/optional_reference"
5
- require "openapi3_parser/node_factory/path_item"
6
- require "openapi3_parser/node/paths"
7
4
 
8
5
  module Openapi3Parser
9
6
  module NodeFactory
@@ -1,9 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/error"
4
- require "openapi3_parser/node_factory/fields/reference"
5
3
  require "openapi3_parser/node_factory/object"
6
- require "openapi3_parser/node_factory/recursive_pointer"
7
4
 
8
5
  module Openapi3Parser
9
6
  module NodeFactory
@@ -1,12 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/context"
4
- require "openapi3_parser/node/request_body"
5
- require "openapi3_parser/node_factory/map"
6
3
  require "openapi3_parser/node_factory/object"
7
- require "openapi3_parser/node_factory/media_type"
8
- require "openapi3_parser/validation/error"
9
- require "openapi3_parser/validators/media_type"
10
4
 
11
5
  module Openapi3Parser
12
6
  module NodeFactory
@@ -1,16 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/context"
4
- require "openapi3_parser/node/response"
5
- require "openapi3_parser/node_factory/map"
6
3
  require "openapi3_parser/node_factory/object"
7
- require "openapi3_parser/node_factory/optional_reference"
8
- require "openapi3_parser/node_factory/header"
9
- require "openapi3_parser/node_factory/media_type"
10
- require "openapi3_parser/node_factory/link"
11
- require "openapi3_parser/validation/input_validator"
12
- require "openapi3_parser/validators/media_type"
13
- require "openapi3_parser/validators/component_keys"
14
4
 
15
5
  module Openapi3Parser
16
6
  module NodeFactory
@@ -1,10 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/context"
4
3
  require "openapi3_parser/node_factory/map"
5
- require "openapi3_parser/node_factory/response"
6
- require "openapi3_parser/node_factory/optional_reference"
7
- require "openapi3_parser/node/responses"
8
4
 
9
5
  module Openapi3Parser
10
6
  module NodeFactory
@@ -1,13 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/schema"
4
- require "openapi3_parser/node_factory/map"
5
3
  require "openapi3_parser/node_factory/object"
6
- require "openapi3_parser/node_factory/optional_reference"
7
- require "openapi3_parser/node_factory/array"
8
- require "openapi3_parser/node_factory/external_documentation"
9
- require "openapi3_parser/node_factory/discriminator"
10
- require "openapi3_parser/node_factory/xml"
11
4
 
12
5
  module Openapi3Parser
13
6
  module NodeFactory
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/security_requirement"
4
- require "openapi3_parser/node_factory/array"
5
3
  require "openapi3_parser/node_factory/map"
6
4
 
7
5
  module Openapi3Parser
@@ -1,9 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/security_scheme"
4
- require "openapi3_parser/node_factory/oauth_flows"
5
3
  require "openapi3_parser/node_factory/object"
6
- require "openapi3_parser/node_factory/optional_reference"
7
4
 
8
5
  module Openapi3Parser
9
6
  module NodeFactory
@@ -1,9 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/server"
4
- require "openapi3_parser/node_factory/map"
5
3
  require "openapi3_parser/node_factory/object"
6
- require "openapi3_parser/node_factory/server_variable"
7
4
 
8
5
  module Openapi3Parser
9
6
  module NodeFactory
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/server_variable"
4
3
  require "openapi3_parser/node_factory/object"
5
- require "openapi3_parser/node_factory/array"
6
4
 
7
5
  module Openapi3Parser
8
6
  module NodeFactory
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/tag"
4
3
  require "openapi3_parser/node_factory/object"
5
4
  require "openapi3_parser/node_factory/external_documentation"
6
5
 
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/error"
4
- require "openapi3_parser/node_factory"
5
-
6
3
  module Openapi3Parser
7
4
  module NodeFactory
8
5
  class TypeChecker
@@ -1,9 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/node/xml"
4
3
  require "openapi3_parser/node_factory/object"
5
- require "openapi3_parser/validators/absolute_uri"
6
4
  require "openapi3_parser/validation/input_validator"
5
+ require "openapi3_parser/validators/absolute_uri"
7
6
 
8
7
  module Openapi3Parser
9
8
  module NodeFactory
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/error"
4
- require "openapi3_parser/source/reference"
5
- require "openapi3_parser/source/reference_resolver"
6
-
7
3
  module Openapi3Parser
8
4
  # Represents a source of data used to produce the OpenAPI document. Documents
9
5
  # which do not have any references to external files will only have a single
@@ -2,9 +2,6 @@
2
2
 
3
3
  require "cgi"
4
4
 
5
- require "openapi3_parser/source"
6
- require "openapi3_parser/validators/reference"
7
-
8
5
  module Openapi3Parser
9
6
  class Source
10
7
  # An object which represents a reference that can be indicated in a OpenAPI
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/context"
4
- require "openapi3_parser/source"
5
-
6
3
  module Openapi3Parser
7
4
  class Source
8
5
  class ReferenceResolver
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/error"
4
-
5
3
  module Openapi3Parser
6
4
  # An abstract class which is used to provide a foundation for classes that
7
5
  # represent the different means of input an OpenAPI document can have. It is
@@ -1,9 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "openapi3_parser/source_input"
4
- require "openapi3_parser/source_input/string_parser"
5
- require "openapi3_parser/source_input/resolve_next"
6
- require "openapi3_parser/error"
7
4
 
8
5
  module Openapi3Parser
9
6
  class SourceInput
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "openapi3_parser/source_input"
4
- require "openapi3_parser/source_input/string_parser"
5
- require "openapi3_parser/source_input/resolve_next"
6
4
 
7
5
  module Openapi3Parser
8
6
  class SourceInput
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/source_input/file"
4
- require "openapi3_parser/source_input/url"
5
-
6
3
  module Openapi3Parser
7
4
  class SourceInput
8
5
  class ResolveNext
@@ -36,7 +36,7 @@ module Openapi3Parser
36
36
  end
37
37
 
38
38
  def parse_yaml
39
- YAML.safe_load(input, [], [], true)
39
+ YAML.safe_load(input, [Date, Time], [], true)
40
40
  end
41
41
  end
42
42
  end
@@ -2,9 +2,6 @@
2
2
 
3
3
  require "open-uri"
4
4
  require "openapi3_parser/source_input"
5
- require "openapi3_parser/source_input/string_parser"
6
- require "openapi3_parser/source_input/resolve_next"
7
- require "openapi3_parser/error"
8
5
 
9
6
  module Openapi3Parser
10
7
  class SourceInput
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "openapi3_parser/validation/error"
4
- require "openapi3_parser/validation/error_collection"
5
-
6
3
  module Openapi3Parser
7
4
  module Validation
8
5
  class Validatable
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "openapi3_parser/array_sentence"
4
- require "openapi3_parser/error"
5
4
 
6
5
  module Openapi3Parser
7
6
  module Validators
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "openapi3_parser/array_sentence"
4
- require "openapi3_parser/error"
5
4
 
6
5
  module Openapi3Parser
7
6
  module Validators
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "openapi3_parser/array_sentence"
4
- require "openapi3_parser/error"
5
4
 
6
5
  module Openapi3Parser
7
6
  module Validators
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Openapi3Parser
4
- VERSION = "0.5.1"
4
+ VERSION = "0.5.2"
5
5
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+
5
6
  require "openapi3_parser/version"
6
7
 
7
8
  Gem::Specification.new do |spec|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openapi3_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Dew
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-01 00:00:00.000000000 Z
11
+ date: 2018-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commonmarker