HomePhorge

Add validation for Operation.parameter/5 function arguments

Description

Add validation for Operation.parameter/5 function arguments

I've noticed a couple of mis-uses of this function, including

  • Omitting the description, causing the opts to be placed in the description parameter
  • Passing invalid options in the opts, particularly default: which should be in the schema

The code now has a guards for the types of all parameters, uses struct! to validate
opts, and has better documentation for the parameters types.

Details

Provenance
Mike BuhotAuthored on Apr 10 2020, 1:59 AM
Parents
R22:0536e0c05806: Merge pull request #212 from minibikini/fix/example
Branches
Unknown
Tags
Unknown

Event Timeline