Sha256: 70468cc62b9d0191714c49e3857c970e9913500077a0e7026c78db1dfdaa33dd
Contents?: true
Size: 840 Bytes
Versions: 26
Compression:
Stored size: 840 Bytes
Contents
module Foobara module TypeDeclarations module Handlers class ExtendEntityTypeDeclaration < 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
26 entries across 26 versions & 1 rubygems