class Swaggable::AttributeDefinition
Public Instance Methods
json_format()
click to toggle source
# File lib/swaggable/attribute_definition.rb, line 28 def json_format json_format_hash.fetch(type) end
json_type()
click to toggle source
# File lib/swaggable/attribute_definition.rb, line 24 def json_type json_type_hash.fetch(type) end
optional?()
click to toggle source
# File lib/swaggable/attribute_definition.rb, line 36 def optional? !required end
required?()
click to toggle source
# File lib/swaggable/attribute_definition.rb, line 32 def required? !!required end
Private Instance Methods
json_format_hash()
click to toggle source
# File lib/swaggable/attribute_definition.rb, line 57 def json_format_hash { integer: :int32, long: :int64, float: :float, double: :double, string: nil, byte: :byte, boolean: nil, date: :date, date_time: :"date-time", password: :password, } end
json_type_hash()
click to toggle source
# File lib/swaggable/attribute_definition.rb, line 42 def json_type_hash { integer: :integer, long: :integer, float: :number, double: :number, string: :string, byte: :string, boolean: :boolean, date: :string, date_time: :string, password: :string, } end