Sha256: 46177cbb87413a513f4c96bcec5dc2fdfe3a55a34af3eaa87a955c35b55bbdb9
Contents?: true
Size: 823 Bytes
Versions: 1
Compression:
Stored size: 823 Bytes
Contents
module OasParser class Parameter < AbstractAttribute raw_keys :name, :in, :description, :style, :enum, :schema, :minimum, :maximum, :required attr_accessor :owner, :raw def initialize(owner, raw) @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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
oas_parser-0.8.0 | lib/oas_parser/parameter.rb |