Sha256: e9969220aa02e046160cd4980c1c9158a21c751e62ab693810c892137d70c083

Contents?: true

Size: 372 Bytes

Versions: 21

Compression:

Stored size: 372 Bytes

Contents

require 'fakeit/openapi/schema'

module OpenAPIParser
  module Schemas
    class Schema
      include Fakeit::Openapi::Schema

      alias old_type type

      def type
        old_type || inferred_type
      end

      private

      def inferred_type
        if properties
          'object'
        elsif items
          'array'
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
fakeit-0.1.2 lib/fakeit/core_extensions/schema.rb