Sha256: 8b68481b6868b0534276a37275fbf502f36c9486e78ade676af50fe40733c251
Contents?: true
Size: 848 Bytes
Versions: 8
Compression:
Stored size: 848 Bytes
Contents
module Foobara module TypeDeclarations module Handlers class ExtendDetachedEntityTypeDeclaration < ExtendModelTypeDeclaration class ValidatePrimaryKeyPresent < TypeDeclarations::TypeDeclarationValidator # TODO: seems like maybe we could actually check against types now... # like make a type for primary_key: :symbol ?? class MissingPrimaryKeyError < TypeDeclarationError; end def validation_errors(strict_type_declaration) unless strict_type_declaration.key?(:primary_key) build_error end end def error_message(_value) "Missing required :primary_key to state which attribute is the primary key" end def error_context(_value) {} end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems