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.7.1 lib/fakeit/core_extensions/schema.rb
fakeit-0.7.0 lib/fakeit/core_extensions/schema.rb
fakeit-0.6.3 lib/fakeit/core_extensions/schema.rb
fakeit-0.6.2 lib/fakeit/core_extensions/schema.rb
fakeit-0.6.1 lib/fakeit/core_extensions/schema.rb
fakeit-0.6.0 lib/fakeit/core_extensions/schema.rb
fakeit-0.5.3 lib/fakeit/core_extensions/schema.rb
fakeit-0.5.2 lib/fakeit/core_extensions/schema.rb
fakeit-0.5.1 lib/fakeit/core_extensions/schema.rb
fakeit-0.5.0 lib/fakeit/core_extensions/schema.rb
fakeit-0.4.2 lib/fakeit/core_extensions/schema.rb
fakeit-0.4.1 lib/fakeit/core_extensions/schema.rb
fakeit-0.4.0 lib/fakeit/core_extensions/schema.rb
fakeit-0.3.1 lib/fakeit/core_extensions/schema.rb
fakeit-0.3.0 lib/fakeit/core_extensions/schema.rb
fakeit-0.2.1 lib/fakeit/core_extensions/schema.rb
fakeit-0.2.0 lib/fakeit/core_extensions/schema.rb
fakeit-0.1.5 lib/fakeit/core_extensions/schema.rb
fakeit-0.1.4 lib/fakeit/core_extensions/schema.rb
fakeit-0.1.3 lib/fakeit/core_extensions/schema.rb