1.0.5 • Published 3 months ago

@availity/dockyard v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

@availity/dockyard

Convert yup schema to a friendly docs object

Version NPM Downloads Dependecy Status

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.5

3 months ago

1.0.4

9 months ago

1.0.2

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.0-alpha.3

2 years ago

1.0.0-alpha.2

3 years ago

1.0.0-alpha.1

3 years ago