class Esquema::Property

def build_maxitems # rubocop:disable Metrics/AbcSize

rubocop:disable Metrics/AbcSize
def build_maxitems # rubocop:disable Metrics/AbcSize
  raise ArgumentError, "maxItems must be an integer" if options[:maxItems] && !options[:maxItems].is_a?(Integer)
  if options[:maxItems]&.negative?
    raise ArgumentError,
          "maxItems must be a non-negative integer"
  end
  if options[:maxItems] && options[:type] != :array
    raise ArgumentError, "maxItems must be use for array type properties only."
  end
  options[:maxItems]
end