Mandatory Inputs and Dependencies are dangerous.
They can cause who vajrams to fail (that is the meaning of mandatory). Also adding a new mandatory input breaks backward compatibility.
Today when we add a input/dependency to a vajram, it assumed as mandatory by default unless the developer marks the type of the facet field as Optional<T>. This is dangerous. All facets must be optional unless the developer deliberately marks it as mandatory.
To support, remove support for Optional<> in facets, and provide a @Mandatory annotation which MUST be added to mandatory facets. If this annotation is missing, then the facet is assumed to be Optional
Mandatory Inputs and Dependencies are dangerous. They can cause who vajrams to fail (that is the meaning of mandatory). Also adding a new mandatory input breaks backward compatibility. Today when we add a input/dependency to a vajram, it assumed as mandatory by default unless the developer marks the type of the facet field as
Optional<T>
. This is dangerous. All facets must be optional unless the developer deliberately marks it as mandatory.To support, remove support for
Optional<>
in facets, and provide a@Mandatory
annotation which MUST be added to mandatory facets. If this annotation is missing, then the facet is assumed to be Optional