Sha256: 8ab79c7bebd0d26ea1004c75f56b1849376c8e4fa797d2390e074e7d2538df8e
Contents?: true
Size: 523 Bytes
Versions: 3
Compression:
Stored size: 523 Bytes
Contents
# frozen_string_literal: true # author: Vadim Shaveiko <@vshaveyko> # :nodoc: class RailsApiDoc::Config::ValidateEnum # # @api_param_data - RailsApiDoc::Controller::Parameter::Repository::Param # @controller_param - ActionController::Parameter # # check validation of current type by given data # # enum: check that enum array includes given value # def valid?(controller_param, api_param_data) return true unless api_param_data.enum? api_param_data[:enum].include?(controller_param) end end
Version data entries
3 entries across 3 versions & 1 rubygems