The documentation should be updated, it seems optional parameters are inferred based on Swift optionality via ?.
Replace this:
@OptionalParameter(title: "Quantity") var quantity: Int?
with this:
@Parameter(title: "Quantity") var quantity: Int?
The user won't be required to specify the parameter.
Topic:
App & System Services
SubTopic:
General
Tags: