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

Design issue with using Joi #67

Open
marklabenski opened this issue Oct 30, 2019 · 5 comments
Open

Design issue with using Joi #67

marklabenski opened this issue Oct 30, 2019 · 5 comments

Comments

@marklabenski
Copy link

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

@petracles
Copy link

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.

@MickL
Copy link

MickL commented Apr 10, 2020

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.

@petracles
Copy link

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

  1. Some product requirements I had to follow and
  2. Being forced to npm i with the --no-optional flag b/c of this issue here.

@MickL
Copy link

MickL commented Apr 10, 2020

@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: #50

@daveteu
Copy link

daveteu commented Aug 21, 2020

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.

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

No branches or pull requests

4 participants