Class: SwaggerParser::Schema

Inherits:
JsonSchema show all
Includes:
ExternalDocsAttributable
Defined in:
lib/swagger_parser/schema.rb

Instance Attribute Summary

Attributes inherited from SourceBasedObject

#source

Instance Method Summary collapse

Methods included from ExternalDocsAttributable

#external_docs

Methods inherited from JsonSchema

#max_properties, #min_properties, #required

Methods included from Referable

#ref

Methods inherited from MinimalJsonSchema

#default, #description, #enum, #exclusive_maximum, #exclusive_minimum, #format, #maxItems, #max_length, #maximum, #min_items, #min_length, #minimum, #multiple_of, #pattern, #title, #type, #unique_items

Methods inherited from SourceBasedObject

#initialize

Constructor Details

This class inherits a constructor from SwaggerParser::SourceBasedObject

Instance Method Details

#discriminatorObject



10
11
12
# File 'lib/swagger_parser/schema.rb', line 10

def discriminator
  source["discriminator"]
end

#exampleObject



15
16
17
# File 'lib/swagger_parser/schema.rb', line 15

def example
  source["example"]
end

#read_onlyfalse, true



20
21
22
# File 'lib/swagger_parser/schema.rb', line 20

def read_only
  !!source["readOnly"]
end

#xmlObject



25
26
27
# File 'lib/swagger_parser/schema.rb', line 25

def xml
  SwaggerParser::Xml.new(source["xml"])
end