2.0.0 • Published 12 months ago
@availity/dockyard v2.0.0
@availity/dockyard
Convert yup schema to a friendly docs object
Installation
NPM
npm install @availity/dockyard
Yarn
yarn add @availity/dockyard
Usage
import yup from 'yup';
import getRules from '@availity/dockyard';
const schema = yup.object({
name: yup.string(),
dateOfBirth: yup.date(),
});
const rules = getRules(schema, options);
options
const options = {
compileRequiredFields: false,
excludeOneOf: false,
excludeTypes: false,
};
compileRequiredFields
: removes the word 'required' from the description and adds an array of required fields to the object.excludeOneOf
: if oneOf is specified on an item, exclude it from the description.excludeTypes
: exclude types from the description.
1.0.7
12 months ago
1.0.6
1 year ago
2.0.0
12 months ago
1.0.5
1 year ago
1.0.4
2 years ago
1.0.2
3 years ago
1.0.3
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
1.0.0-alpha.3
4 years ago
1.0.0-alpha.2
4 years ago
1.0.0-alpha.1
4 years ago