def ensure_schema(value, child_schema)
      if value.present? && child_schema.present?
        value = if child_schema.is_a?(Array)
                  value.map do |item|
                    item.is_a?(SchemaModel) ? item : child_schema[0].new(item)
                  end
                else
                  value.is_a?(SchemaModel) ? value : child_schema.new(value)
                end
      end

      value
    end
def ensure_schema(value, child_schema)
      if value.present? && child_schema.present?
        value = if child_schema.is_a?(Array)
                  value.map do |item|
                    item.is_a?(SchemaModel) ? item : child_schema[0].new(item)
                  end
                else
                  value.is_a?(SchemaModel) ? value : child_schema.new(value)
                end
      end

      value
    end
Constructs new instance(s) of provided Schema model from hash or
 array of hash values. Allows for modeling of has_one and has_many.
 @param [Array of Hashes or SchemaModels] value
 @param [SchemaModel] child_schema