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

Added validateSchema hook to validate JSON objects #68

Merged
merged 4 commits into from
Jan 5, 2017
Merged

Conversation

eddyystop
Copy link
Collaborator

  • Uses ajv validator repo which Best Buy API playground uses
  • ajv is injected into hook so its not pulled into feathers-hooks-common
  • This hook differs enough not to have to attribute to BB's hook
  • Handles sync ajv validation. Async results from custom plugins to ajv.
  • Throws with an array of err messages in err.errors
  • Overriding error formatting func could create e.g. { name: msg } type
  • The above opens possibility to use this for some UI validation.

eddyystop and others added 4 commits December 8, 2016 14:09
- Uses ajv valiadtor repo which Best Buy API playground uses
- ajv is injected into hook so its not pulled into feathers-hooks-common
- This hook differs enough not to have to attribute to BB's hook
- Handles sync ajv validation. Async results from custom plugins to ajv.
- Throws with an array of err messages in err.errors
- Overriding error formatting func could create e.g. { name: msg } type
- The above opens possibility to use this for some UI validation.
@daffl
Copy link
Member

daffl commented Dec 29, 2016

:shipit:

@ekryski
Copy link
Member

ekryski commented Jan 5, 2017

Totally :shipit: on this one! This is sweet! 🍭

@eddyystop eddyystop merged commit 310ecf2 into master Jan 5, 2017
@daffl daffl deleted the ajv branch January 21, 2017 20:10
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

Successfully merging this pull request may close these issues.

3 participants