From b6267e23248ff54dfda0dc758f009ffe5a39b6a1 Mon Sep 17 00:00:00 2001 From: Marshall Thompson Date: Tue, 11 Feb 2020 21:30:24 -0700 Subject: [PATCH] Add joiOptions to README.md --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 98c239d..386dd1c 100755 --- a/README.md +++ b/README.md @@ -99,7 +99,23 @@ This repo helps implement this in [Feathers](http://feathersjs.com/) CRUD ## API Reference -To do. +The `joiOptions` object is passed directly to the schema, internally. You can see all of the available options and defaults [in the @hapi/joi documentation](https://hapi.dev/family/joi/api/?v=17.1.0#anyvalidatevalue-options). Here is a summary of the defaults: + +```js +const joiDefaults = { + abortEarly: true, + allowUnknown: false, + cache: true, + convert: true, + debug: false, + externals: true, + noDefaults: false, + nonEnumerables: false, + presence: 'optional', + skipFunctions: false, + stripUnknown: false +}; +``` ## Tests