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.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/CHANGELOG.md +6 -0
- data/README.md +5 -1
- data/TODO.md +1 -0
- data/lib/openapi3_parser.rb +13 -0
- data/lib/openapi3_parser/context.rb +2 -2
- data/lib/openapi3_parser/node_factories/array.rb +4 -2
- data/lib/openapi3_parser/node_factories/components.rb +4 -0
- data/lib/openapi3_parser/node_factories/schema.rb +15 -2
- data/lib/openapi3_parser/node_factories/server_variable.rb +10 -2
- data/lib/openapi3_parser/node_factory.rb +17 -1
- data/lib/openapi3_parser/node_factory/map.rb +4 -0
- data/lib/openapi3_parser/node_factory/object.rb +3 -5
- data/lib/openapi3_parser/node_factory/object/node_builder.rb +19 -8
- data/lib/openapi3_parser/nodes/array.rb +8 -0
- data/lib/openapi3_parser/nodes/callback.rb +1 -0
- data/lib/openapi3_parser/nodes/components.rb +12 -0
- data/lib/openapi3_parser/nodes/contact.rb +4 -0
- data/lib/openapi3_parser/nodes/discriminator.rb +3 -0
- data/lib/openapi3_parser/nodes/encoding.rb +6 -0
- data/lib/openapi3_parser/nodes/example.rb +5 -0
- data/lib/openapi3_parser/nodes/external_documentation.rb +3 -0
- data/lib/openapi3_parser/nodes/header.rb +1 -0
- data/lib/openapi3_parser/nodes/info.rb +7 -0
- data/lib/openapi3_parser/nodes/license.rb +3 -0
- data/lib/openapi3_parser/nodes/link.rb +7 -0
- data/lib/openapi3_parser/nodes/map.rb +6 -0
- data/lib/openapi3_parser/nodes/media_type.rb +5 -0
- data/lib/openapi3_parser/nodes/oauth_flow.rb +5 -0
- data/lib/openapi3_parser/nodes/oauth_flows.rb +5 -0
- data/lib/openapi3_parser/nodes/openapi.rb +11 -0
- data/lib/openapi3_parser/nodes/operation.rb +16 -0
- data/lib/openapi3_parser/nodes/parameter.rb +3 -0
- data/lib/openapi3_parser/nodes/parameter/parameter_like.rb +14 -0
- data/lib/openapi3_parser/nodes/path_item.rb +14 -0
- data/lib/openapi3_parser/nodes/paths.rb +1 -0
- data/lib/openapi3_parser/nodes/request_body.rb +4 -0
- data/lib/openapi3_parser/nodes/response.rb +5 -0
- data/lib/openapi3_parser/nodes/responses.rb +2 -0
- data/lib/openapi3_parser/nodes/schema.rb +38 -0
- data/lib/openapi3_parser/nodes/security_requirement.rb +1 -0
- data/lib/openapi3_parser/nodes/security_scheme.rb +9 -0
- data/lib/openapi3_parser/nodes/server.rb +5 -2
- data/lib/openapi3_parser/nodes/server_variable.rb +4 -0
- data/lib/openapi3_parser/nodes/tag.rb +4 -0
- data/lib/openapi3_parser/nodes/xml.rb +8 -2
- data/lib/openapi3_parser/version.rb +1 -1
- 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
|
-
|
26
|
+
# @return [Boolean]
|
27
|
+
def attribute?
|
23
28
|
node_data["attribute"]
|
24
29
|
end
|
25
30
|
|
26
|
-
|
31
|
+
# @return [Boolean]
|
32
|
+
def wrapped?
|
27
33
|
node_data["wrapped"]
|
28
34
|
end
|
29
35
|
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.
|
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
|
+
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
|