-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Support ternary expression in archetype v2:
<enum name="color" default="${shape} == 'circle' ? 'red' : 'blue'">
<option value="red" label="Red"/>
<option value="green" label="Green"/>
<option value="blue" label="Blue"/>
</enum>Update Expression to return a Value instead of boolean a let the caller decide how to resolve the result.
Investigate if we can introduce a new syntax for substituting expressions.
E.g.
default="#{${shape} == 'circle' ? 'red' : 'blue'}"
default="`${shape} == 'circle' ? 'red' : 'blue'}`"
default="#{shape == 'circle' ? 'red' : 'blue'}"