Sha256: b929642b23c169de46903a2a77ebaf736e575ff005bada258500500db8ea64a1

Contents?: true

Size: 398 Bytes

Versions: 42

Compression:

Stored size: 398 Bytes

Contents

module OasParser
  class Payload
    def formats
      return [] unless content
      content.keys
    end

    def schema(format)
      content[format]['schema']
    end

    def split_schemas(format)
      content[format]['schema']['oneOf']
    end

    def exhibits_one_of_multiple_schemas?(format)
      return false unless content
      schema(format).keys.include?('oneOf')
    end
  end
end

Version data entries

42 entries across 42 versions & 2 rubygems

Version Path
oas_parser_reborn-0.25.5 lib/oas_parser_reborn/payload.rb
oas_parser-0.25.4 lib/oas_parser/payload.rb
oas_parser-0.25.3 lib/oas_parser/payload.rb
oas_parser-0.25.1 lib/oas_parser/payload.rb
oas_parser-0.25.0 lib/oas_parser/payload.rb
oas_parser-0.24.0 lib/oas_parser/payload.rb
oas_parser-0.23.0 lib/oas_parser/payload.rb
oas_parser-0.22.4 lib/oas_parser/payload.rb
oas_parser-0.22.2 lib/oas_parser/payload.rb
oas_parser-0.22.1 lib/oas_parser/payload.rb
oas_parser-0.22.0 lib/oas_parser/payload.rb
oas_parser-0.21.1 lib/oas_parser/payload.rb
oas_parser-0.21.0 lib/oas_parser/payload.rb
oas_parser-0.20.0 lib/oas_parser/payload.rb
oas_parser-0.19.0 lib/oas_parser/payload.rb
oas_parser-0.18.2 lib/oas_parser/payload.rb
oas_parser-0.18.1 lib/oas_parser/payload.rb
oas_parser-0.18.0 lib/oas_parser/payload.rb
oas_parser-0.17.0 lib/oas_parser/payload.rb
oas_parser-0.16.0 lib/oas_parser/payload.rb