3.0.0 • Published 6 months ago
@availity/dockyard v3.0.0
@availity/dockyard
Convert yup schema to a friendly docs object
Installation
NPM
npm install @availity/dockyardYarn
yarn add @availity/dockyardUsage
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.
3.0.0
6 months ago
2.0.2
8 months ago
2.0.1
8 months ago
1.0.7
1 year ago
1.0.6
1 year ago
2.0.0
1 year ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.2
3 years ago
1.0.3
3 years ago
1.0.1
4 years ago
1.0.0
4 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