Sha256: 6f8caf421334df31ae6ceafac306e194062840c3ad381a4af7c163f82c7468dc

Contents?: true

Size: 356 Bytes

Versions: 7

Compression:

Stored size: 356 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

      private

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fakeit-0.11.0 lib/fakeit/core_extensions/schema.rb
fakeit-0.10.0 lib/fakeit/core_extensions/schema.rb
fakeit-0.9.2 lib/fakeit/core_extensions/schema.rb
fakeit-0.9.1 lib/fakeit/core_extensions/schema.rb
fakeit-0.9.0 lib/fakeit/core_extensions/schema.rb
fakeit-0.8.1 lib/fakeit/core_extensions/schema.rb
fakeit-0.8.0 lib/fakeit/core_extensions/schema.rb