-
Notifications
You must be signed in to change notification settings - Fork 0
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
Investigate alternatives to Joi for schema definition #26
Comments
JSON-schema looks cool, and has similarities to the structure described in #20. It looks like there is pretty decent support for many of the data types we might encounter. I haven't checked if it covers everything Joi does, but I imagine anything not covered might be a fairly niche data type, that could maybe be tackled by extending the standard |
This obviously wouldn't help us specifying permissions, or view rendering though like we are doing with the One option is to make each value in the Going with this option means we have to either ditch Thoughts, anyone? |
the sole mis-answer on this question shows people have thought about storing it. |
@nelsonic Having started to work with json-schema as suggested and deciding to implement we found a couple of problems:
Creating our own api heavily inspired by joi where possible seems like a better idea as we have found the api-reference very good. It's well presented, easy to understand, see all possible options quickly and if followed we can easily implement the validation with joi if we follow a one to one mapping. |
Closing issue, as we have conformed to following Joi's api and away from JSON schema. Will reopen if following Joi's convention becomes problematic. |
Joi https://github.com/hapijs/joi was designed for a specific purpose (validation) and it fits that purpose really well. But
http://json-schema.org/ is a proposed standard with a well-defined spec: http://json-schema.org/documentation.html
First step is defining our requirements.
The text was updated successfully, but these errors were encountered: