class Apicraft::Mocker::Array

using Mocker types
Generate an array based on the schema

def max_items

def max_items
  schema.maxItems || 25
end

def min_items

def min_items
  schema.minItems || 1
end

def mock

def mock
  ::Array.new(
    (min_items..max_items)
    .to_a
    .sample
  ).map do |_i|
    Mocker.mock(schema.items)
  end
end

def unique_items

def unique_items
  schema.uniqueItems.present?
end