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

Constraint declaration #11

Open
exavolt opened this issue Jun 7, 2022 · 0 comments
Open

Constraint declaration #11

exavolt opened this issue Jun 7, 2022 · 0 comments

Comments

@exavolt
Copy link
Member

exavolt commented Jun 7, 2022

Check https://github.com/rez-go/constraints .

The user-flow would be something like this:

  • Declare the constraint for a field as a variable in the code
  • Provide this constraint through the skeleton
  • The docgen will use the constraint provided through the skeleton to provide an accurate documentation for a field
  • The function that uses the config, uses the same constraint to check the validity of the value of the field

We can make the loader to use the constraints provided through the skeleton when loading to automatically check the loaded values, but we prefer that validity-checking is performed by user functions to ensure that they always check for bad inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant