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

Configuration contentTypes validation need detailed shape #5

Open
bernardodiasc opened this issue Aug 20, 2017 · 0 comments
Open

Configuration contentTypes validation need detailed shape #5

bernardodiasc opened this issue Aug 20, 2017 · 0 comments

Comments

@bernardodiasc
Copy link
Owner

bernardodiasc commented Aug 20, 2017

Currently the contentTypes validation are limited to an array of object. It should define better the object shape.

Actual

contentTypes: Joi.array().min(1).items(Joi.object()).required(),

Expected

Example:

contentTypes: Joi.array().min(1).items(
  Joi.object({
    arg: Joi.string().required(),
    value: Joi.func().required(),
  })
).required(),

The problem with the snippet above is that is not valid for the need, using it just as pseudo-code.

@bernardodiasc bernardodiasc modified the milestone: Enhancements Aug 20, 2017
@bernardodiasc bernardodiasc changed the title ContentTypes validation Configuration contentTypes validation need detailed shape Aug 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant