Open marklabenski opened 5 years ago
Having problems myself with Joi right now. I know it's super-popular and reliable, but just seems unnecessary to document schema definitions in this way.
Could you please explain why Joi is a bad decision and what would be an alternative?
There is an open PR btw that updated all the dependencies, including Joi.
Hey @MickL - novice move on my part. When writing my previous comment, I was new to Joi and it's validation superpowers. I believe my frustrations before were learning more about Joi than with anything in regards to dynamodb
. Sry for the vague comment above!
That said, I actually ended up using my own wrapper on DynamoDB.DocumentClient
because of
npm i
with the --no-optional
flag b/c of this issue here.@petracles I am really curious what requirements you had that couldnt be done with this module. And what did you do in your wrapper to match those requirements?
For the other issue: The dependencies of this module are very outdated and dont work with latest node version. There is an open PR that fixes that, but seems like this module is no more maintained. You can use my fork for now, I will comment here: https://github.com/baseprime/dynamodb/issues/50
why doesn't README have anything that talks about Joi.
First time using dynamodb, came to this repo because of google search.
First part of README already asking to use Joi but not mentioned. Joi is popular and every JS should know about Joi is pretty subjective, I did JS for a long while now and I've never used Joi.
I wonder why nobody pointed this out yet:
I think it was a bad descision to make Joi required for using dynamodb on one hand, but on the other hand it's not included in the dependencies. (something like "dynamo.joi" or "dynamo.joiTypes" maybe?) Sure, everyone who knows JS will be able to require Joi and using it with dynamodb, but it's not mentioned anywhere and there is no "fallback" provided if you don't want to use joi at all.
Could you come up with a resolution or will you change this in the future?
Best, Mark