You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ComponentAttributes have a type property that must reflect the type of their value property.
Currently, this type property must be set by each plugin's parser.
This is not ideal for a few reasons:
Duplication of the logic to reflect the type from the value in each plugin.
Plugin writers need to know which type to use, which is not very obvious (types must all start by an uppercase character, attributes with a definitions of type Object or Link must be of type Array, ...).
This property can be computed automatically from the value, so it is somewhat redundant.
We should determine if we can to move this concern to leto-modelizer-plugin-core, instead of plugins.
It could be done for example in the constructor of ComponentAttribute, or a get function to automatically compute the type from the value.
The text was updated successfully, but these errors were encountered:
ComponentAttribute
s have atype
property that must reflect the type of theirvalue
property.Currently, this
type
property must be set by each plugin's parser.This is not ideal for a few reasons:
type
from thevalue
in each plugin.type
to use, which is not very obvious (types must all start by an uppercase character, attributes with a definitions of typeObject
orLink
must be of typeArray
, ...).value
, so it is somewhat redundant.We should determine if we can to move this concern to
leto-modelizer-plugin-core
, instead of plugins.It could be done for example in the constructor of
ComponentAttribute
, or aget
function to automatically compute thetype
from thevalue
.The text was updated successfully, but these errors were encountered: