Closed syphax-bouazzouni closed 10 months ago
Currently, to define a property type we use the enforce statement, like so
attribute :uri, enforce: [:URI, :existence, :unique]
The problem is that the validators (existence and uniqueness) are mixed with the property range (URI)
The proposition would be to add the 'type' argument and transform it like the following
attribute :URI, type: :URI , enforce: [:existence, :unique]
It will still be backward compatible because we it's only a redirection, i.e type: :uri will be added to the enforce clause in the back
type: :uri
enforce
implemented in https://github.com/ontoportal-lirmm/goo/pull/27
Requirement
Currently, to define a property type we use the enforce statement, like so
The problem is that the validators (existence and uniqueness) are mixed with the property range (URI)
The proposition would be to add the 'type' argument and transform it like the following
It will still be backward compatible because we it's only a redirection, i.e
type: :uri
will be added to theenforce
clause in the back