Sha256: 968231f1f5f9fcc0fe25fd093b94ad06dced86b3bdc7c4aec115740fd02aec1b
Contents?: true
Size: 897 Bytes
Versions: 6
Compression:
Stored size: 897 Bytes
Contents
module {{namespace_module}} module {{resource_module}} module List class Validator include Shogun::Validator include {{resource_module}} INCLUDES_ALLOWED = %w|| FIELDS_ALLOWED = %w|id created_at updated_at destroyed_at href meta links linked| FILTERS_ALLOWED = %w|username signature created_at name| LIMIT_RANGE = 1..100 def initialize(data:) @verifiers = [ Shogun::Verifier::Range.new(data: data.limit, name: "limit", range: LIMIT_RANGE), Shogun::Verifier::Allowed.new(data: data.filters.keys, name: "filters", list: FILTERS_ALLOWED), Shogun::Verifier::Allowed.new(data: data.includes, name: "includes", list: INCLUDES_ALLOWED), Shogun::Verifier::Allowed.new(data: data.fields, name: "fields", list: FIELDS_ALLOWED) ] end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems