openapi3_parser 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/CHANGELOG.md +6 -0
  4. data/README.md +5 -1
  5. data/TODO.md +1 -0
  6. data/lib/openapi3_parser.rb +13 -0
  7. data/lib/openapi3_parser/context.rb +2 -2
  8. data/lib/openapi3_parser/node_factories/array.rb +4 -2
  9. data/lib/openapi3_parser/node_factories/components.rb +4 -0
  10. data/lib/openapi3_parser/node_factories/schema.rb +15 -2
  11. data/lib/openapi3_parser/node_factories/server_variable.rb +10 -2
  12. data/lib/openapi3_parser/node_factory.rb +17 -1
  13. data/lib/openapi3_parser/node_factory/map.rb +4 -0
  14. data/lib/openapi3_parser/node_factory/object.rb +3 -5
  15. data/lib/openapi3_parser/node_factory/object/node_builder.rb +19 -8
  16. data/lib/openapi3_parser/nodes/array.rb +8 -0
  17. data/lib/openapi3_parser/nodes/callback.rb +1 -0
  18. data/lib/openapi3_parser/nodes/components.rb +12 -0
  19. data/lib/openapi3_parser/nodes/contact.rb +4 -0
  20. data/lib/openapi3_parser/nodes/discriminator.rb +3 -0
  21. data/lib/openapi3_parser/nodes/encoding.rb +6 -0
  22. data/lib/openapi3_parser/nodes/example.rb +5 -0
  23. data/lib/openapi3_parser/nodes/external_documentation.rb +3 -0
  24. data/lib/openapi3_parser/nodes/header.rb +1 -0
  25. data/lib/openapi3_parser/nodes/info.rb +7 -0
  26. data/lib/openapi3_parser/nodes/license.rb +3 -0
  27. data/lib/openapi3_parser/nodes/link.rb +7 -0
  28. data/lib/openapi3_parser/nodes/map.rb +6 -0
  29. data/lib/openapi3_parser/nodes/media_type.rb +5 -0
  30. data/lib/openapi3_parser/nodes/oauth_flow.rb +5 -0
  31. data/lib/openapi3_parser/nodes/oauth_flows.rb +5 -0
  32. data/lib/openapi3_parser/nodes/openapi.rb +11 -0
  33. data/lib/openapi3_parser/nodes/operation.rb +16 -0
  34. data/lib/openapi3_parser/nodes/parameter.rb +3 -0
  35. data/lib/openapi3_parser/nodes/parameter/parameter_like.rb +14 -0
  36. data/lib/openapi3_parser/nodes/path_item.rb +14 -0
  37. data/lib/openapi3_parser/nodes/paths.rb +1 -0
  38. data/lib/openapi3_parser/nodes/request_body.rb +4 -0
  39. data/lib/openapi3_parser/nodes/response.rb +5 -0
  40. data/lib/openapi3_parser/nodes/responses.rb +2 -0
  41. data/lib/openapi3_parser/nodes/schema.rb +38 -0
  42. data/lib/openapi3_parser/nodes/security_requirement.rb +1 -0
  43. data/lib/openapi3_parser/nodes/security_scheme.rb +9 -0
  44. data/lib/openapi3_parser/nodes/server.rb +5 -2
  45. data/lib/openapi3_parser/nodes/server_variable.rb +4 -0
  46. data/lib/openapi3_parser/nodes/tag.rb +4 -0
  47. data/lib/openapi3_parser/nodes/xml.rb +8 -2
  48. data/lib/openapi3_parser/version.rb +1 -1
  49. metadata +3 -2
@@ -4,26 +4,32 @@ require "openapi3_parser/node/object"
4
4
 
5
5
  module Openapi3Parser
6
6
  module Nodes
7
+ # @see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#xmlObject
7
8
  class Xml
8
9
  include Node::Object
9
10
 
11
+ # @return [String, nil]
10
12
  def name
11
13
  node_data["name"]
12
14
  end
13
15
 
16
+ # @return [String, nil]
14
17
  def namespace
15
18
  node_data["namespace"]
16
19
  end
17
20
 
21
+ # @return [String, nil]
18
22
  def prefix
19
23
  node_data["prefix"]
20
24
  end
21
25
 
22
- def attribute
26
+ # @return [Boolean]
27
+ def attribute?
23
28
  node_data["attribute"]
24
29
  end
25
30
 
26
- def wrapped
31
+ # @return [Boolean]
32
+ def wrapped?
27
33
  node_data["wrapped"]
28
34
  end
29
35
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Openapi3Parser
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
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.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Dew
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-26 00:00:00.000000000 Z
11
+ date: 2017-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,6 +92,7 @@ files:
92
92
  - ".rubocop.yml"
93
93
  - ".ruby-version"
94
94
  - ".travis.yml"
95
+ - CHANGELOG.md
95
96
  - Gemfile
96
97
  - LICENCE
97
98
  - README.md