Adding stoplight to another project, and it seems it would be good to do one of the following:
- Have stoplight provide some built-in validators
- Provide an add-on library (f.e
stoplight-rules) for some built-in validators
The primary purpose is to enable having some various pre-defined rules for well known types that people can just use instead of having to figure out how to do it. Some example types that should be covered as a starting point:
Some of these may require adding bounds (length, min/max, etc) as configuration/parameters to the provided rules.
NOTE: This is in comparison to other libraries like voluptuous which provide extensive Schema support; voluptuous relies on type-casting thus enabling the Python VM to be cracked via the isinstance and other type-casting methods.
Adding
stoplightto another project, and it seems it would be good to do one of the following:stoplight-rules) for some built-in validatorsThe primary purpose is to enable having some various pre-defined rules for well known types that people can just use instead of having to figure out how to do it. Some example types that should be covered as a starting point:
Some of these may require adding bounds (length, min/max, etc) as configuration/parameters to the provided rules.
NOTE: This is in comparison to other libraries like
voluptuouswhich provide extensive Schema support;voluptuousrelies on type-casting thus enabling the Python VM to be cracked via theisinstanceand other type-casting methods.