Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#ExplicitMandatory Make inputs and dependencies mandatory only if @Mandatory annotation is set on the facet. #265

Open
RamAnvesh opened this issue Jul 9, 2024 · 0 comments
Labels
good first issue Good for newcomers size: s Small change

Comments

@RamAnvesh
Copy link
Collaborator

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

@RamAnvesh RamAnvesh added good first issue Good for newcomers size: s Small change labels Jul 9, 2024
@RamAnvesh RamAnvesh changed the title #ExplicitMandatory Make inputs and dependencies mandatory only if @Mandatiry annotation is set on the facet. #ExplicitMandatory Make inputs and dependencies mandatory only if @Mandatory annotation is set on the facet. Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers size: s Small change
Projects
None yet
Development

No branches or pull requests

1 participant