Generate a Joi schema from some JSON or a JS object