Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Review importance of manual constraint validation #135

Open
whitlockjc opened this issue Jan 29, 2015 · 3 comments
Open

Review importance of manual constraint validation #135

whitlockjc opened this issue Jan 29, 2015 · 3 comments

Comments

@whitlockjc
Copy link
Member

We currently have code that will validate a defaultValue/default property (where applicable) manually in lib/validators.js. This code probably is not necessary and we should see if we can remove it and instead rely on JSON Schema validation.

@whitlockjc
Copy link
Member Author

We definitely needed this code at one point and we still need to do manual validation (default values for example) but if we could create a schema to validate against, we could just defer to the JSON Schema validator for validation instead of duplicating their efforts.

@whitlockjc
Copy link
Member Author

For us to remove the manual validation we would need to convert the pseudo-schema objects, like parameters, into real schemas so we can validate against the schema for said object.

@whitlockjc
Copy link
Member Author

Whatever we do here, whether we keep what we have or alter it to rely on JSON Schema for validation, we should expose the method as a helper for those wanting to use it.

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

No branches or pull requests

1 participant