It looks like I have to include the a value for the spacings property. Is there a value I can set it to to maintain the current spacings?
Error: The stack properties object is invalid because
it doesn't contain both the 'orientation' and 'spacings' fields.
Error: The 'spacings' attribute of stack is invalid because
it doesn't represent either a number or an array.
OK I think I found that it is required:
Error: The desired stack spacings array is invalid since it contains 0 spaces
which cannot be applied between 2 stack cells (1 stack spacing is required).
Correct. The spacings property is required, and is must be a number or array of numbers, not undefined, null, or an empty array. This is inconsistent with the XD UI which allows for unspecified spacings.