Class: Openapi3Parser::Node::Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi3_parser/node/schema.rb

Overview

rubocop:disable ClassLength

Instance Attribute Summary

Attributes inherited from Object

#node_context, #node_data

Instance Method Summary collapse

Methods inherited from Object

#[], #each, #extension, #initialize, #inspect, #node_at, #render_markdown

Constructor Details

This class inherits a constructor from Openapi3Parser::Node::Object

Instance Method Details

#additional_properties?Boolean

Returns:

  • (Boolean)


126
127
128
# File 'lib/openapi3_parser/node/schema.rb', line 126

def additional_properties?
  self["additionalProperties"] != false
end

#additional_properties_schemaSchema?

Returns:



131
132
133
134
135
# File 'lib/openapi3_parser/node/schema.rb', line 131

def additional_properties_schema
  properties = self["additionalProperties"]
  return if [true, false].include?(properties)
  properties
end

#all_ofNode::Array<Schema>?

Returns:



96
97
98
# File 'lib/openapi3_parser/node/schema.rb', line 96

def all_of
  self["allOf"]
end

#any_ofNode::Array<Schema>?

Returns:



106
107
108
# File 'lib/openapi3_parser/node/schema.rb', line 106

def any_of
  self["anyOf"]
end

#defaultAny

Returns:

  • (Any)


153
154
155
# File 'lib/openapi3_parser/node/schema.rb', line 153

def default
  self["default"]
end

#deprecated?Boolean

Returns:

  • (Boolean)


193
194
195
# File 'lib/openapi3_parser/node/schema.rb', line 193

def deprecated?
  self["deprecated"]
end

#descriptionString?

Returns:

  • (String, nil)


138
139
140
# File 'lib/openapi3_parser/node/schema.rb', line 138

def description
  self["description"]
end

#description_htmlString?

Returns:

  • (String, nil)


143
144
145
# File 'lib/openapi3_parser/node/schema.rb', line 143

def description_html
  render_markdown(description)
end

#disciminatorDiscriminator?

Returns:



163
164
165
# File 'lib/openapi3_parser/node/schema.rb', line 163

def disciminator
  self["discriminator"]
end

#enumNode::Array<Object>?

Returns:



86
87
88
# File 'lib/openapi3_parser/node/schema.rb', line 86

def enum
  self["enum"]
end

#exampleAny

Returns:

  • (Any)


188
189
190
# File 'lib/openapi3_parser/node/schema.rb', line 188

def example
  self["example"]
end

#exclusive_maximum?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/openapi3_parser/node/schema.rb', line 26

def exclusive_maximum?
  self["exclusiveMaximum"]
end

#exclusive_minimum?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/openapi3_parser/node/schema.rb', line 36

def exclusive_minimum?
  self["exclusiveMinimum"]
end

#external_docsExternalDocumentation?

Returns:



183
184
185
# File 'lib/openapi3_parser/node/schema.rb', line 183

def external_docs
  self["externalDocs"]
end

#formatString?

Returns:

  • (String, nil)


148
149
150
# File 'lib/openapi3_parser/node/schema.rb', line 148

def format
  self["format"]
end

#itemsSchema?

Returns:



116
117
118
# File 'lib/openapi3_parser/node/schema.rb', line 116

def items
  self["items"]
end

#max_itemsInteger?

Returns:

  • (Integer, nil)


56
57
58
# File 'lib/openapi3_parser/node/schema.rb', line 56

def max_items
  self["maxItems"]
end

#max_lengthInteger?

Returns:

  • (Integer, nil)


41
42
43
# File 'lib/openapi3_parser/node/schema.rb', line 41

def max_length
  self["maxLength"]
end

#max_propertiesInteger?

Returns:

  • (Integer, nil)


71
72
73
# File 'lib/openapi3_parser/node/schema.rb', line 71

def max_properties
  self["maxProperties"]
end

#maximumInteger?

Returns:

  • (Integer, nil)


21
22
23
# File 'lib/openapi3_parser/node/schema.rb', line 21

def maximum
  self["maximum"]
end

#min_itemsInteger

Returns:

  • (Integer)


61
62
63
# File 'lib/openapi3_parser/node/schema.rb', line 61

def min_items
  self["minItems"]
end

#min_lengthInteger

Returns:

  • (Integer)


46
47
48
# File 'lib/openapi3_parser/node/schema.rb', line 46

def min_length
  self["minLength"]
end

#min_propertiesInteger

Returns:

  • (Integer)


76
77
78
# File 'lib/openapi3_parser/node/schema.rb', line 76

def min_properties
  self["minProperties"]
end

#minimumInteger?

Returns:

  • (Integer, nil)


31
32
33
# File 'lib/openapi3_parser/node/schema.rb', line 31

def minimum
  self["minimum"]
end

#multiple_ofNumeric?

Returns:

  • (Numeric, nil)


16
17
18
# File 'lib/openapi3_parser/node/schema.rb', line 16

def multiple_of
  self["multipleOf"]
end

#notSchema?

Returns:



111
112
113
# File 'lib/openapi3_parser/node/schema.rb', line 111

def not
  self["not"]
end

#nullable?Boolean

Returns:

  • (Boolean)


158
159
160
# File 'lib/openapi3_parser/node/schema.rb', line 158

def nullable?
  self["nullable"]
end

#one_ofNode::Array<Schema>?

Returns:



101
102
103
# File 'lib/openapi3_parser/node/schema.rb', line 101

def one_of
  self["oneOf"]
end

#patternString?

Returns:

  • (String, nil)


51
52
53
# File 'lib/openapi3_parser/node/schema.rb', line 51

def pattern
  self["pattern"]
end

#propertiesMap<String, Schema>

Returns:



121
122
123
# File 'lib/openapi3_parser/node/schema.rb', line 121

def properties
  self["properties"]
end

#read_only?Boolean

Returns:

  • (Boolean)


168
169
170
# File 'lib/openapi3_parser/node/schema.rb', line 168

def read_only?
  self["readOnly"]
end

#requiredNode::Array<String>?

Returns:



81
82
83
# File 'lib/openapi3_parser/node/schema.rb', line 81

def required
  self["required"]
end

#titleString?

Returns:

  • (String, nil)


11
12
13
# File 'lib/openapi3_parser/node/schema.rb', line 11

def title
  self["title"]
end

#typeString?

Returns:

  • (String, nil)


91
92
93
# File 'lib/openapi3_parser/node/schema.rb', line 91

def type
  self["type"]
end

#unique_items?Boolean

Returns:

  • (Boolean)


66
67
68
# File 'lib/openapi3_parser/node/schema.rb', line 66

def unique_items?
  self["uniqueItems"]
end

#write_only?Boolean

Returns:

  • (Boolean)


173
174
175
# File 'lib/openapi3_parser/node/schema.rb', line 173

def write_only?
  self["writeOnly"]
end

#xmlXml?

Returns:



178
179
180
# File 'lib/openapi3_parser/node/schema.rb', line 178

def xml
  self["xml"]
end