Skip to content

Bidirectional describe() <-> build() #1867

@hueniverse

Description

@hueniverse

Construct a schema using the description format.

Flags:

  • default, failover - plain value changed from value to { value }, function changes to direct reference without description.
  • allowUnknown -> unknown
  • allowOnly -> only

Options:

  • Changed options to preferences

Types:

  • lazy once flag moved to root
  • object shallow flag removed from describe()
  • alternatives wraps 'schema' matches item, rename alternatives to matches
  • boolean remove true false from default list of truthy/falsy
  • change symbol error string format
  • object patterns regex value changed to { regex }
  • change ref description (remove key, add all other properties when not the default, change ref to type and wrap in { ref } when object key is not ref).
  • Move description, label, and unit to flags
  • Renamed children to keys
  • Change string.regex to string.pattern and change arg to { pattern, options }
  • array unique arguments changed to original args
  • object instanceof arguments changed to original args

Valids / Invalids:

  • nun-null objects changed from value to { value }
  • rename valids to allow and invalids to invalid
  • only included if different from type default

Tests:

  • arg changed to args
  • single argument always include argument name

Misc:

  • meta -> metas

Metadata

Metadata

Assignees

Labels

breaking changesChange that can breaking existing codefeatureNew functionality or improvement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions