Sha256: a1a448a6791e0f37d3a14b4c61decb34ccae5fd1cb1c8d320fbf3992c685ea77
Contents?: true
Size: 834 Bytes
Versions: 21
Compression:
Stored size: 834 Bytes
Contents
module OasParser class Parameter < AbstractAttribute raw_keys :in, :description, :style, :schema, :minimum, :maximum, :required attr_accessor :owner, :raw def initialize(owner, raw) super(raw['name']) @owner = owner @raw = raw end def type raw['type'] || (schema ? schema['type'] : nil) end def format raw['format'] || (schema ? schema['format'] : nil) end def items schema['items'] end def example raw['example'] || (schema ? schema['example'] : nil) end def default raw['default'] || (schema ? schema['default'] : nil) end def convert_property_schema_to_properties(schema) schema.map do |name, definition| OasParser::Property.new(self, raw, name, definition) end end end end
Version data entries
21 entries across 21 versions & 1 rubygems