A work-around we found is to use bash to substitute empty parameter with a mandatory one.
Our context is a command, but there is no reason for it not to work with jobs
commands:
my-cmd:
parameters:
foo: # always set
type: string
bar: # Optional, takes foo as default
type: string
default: ''
steps:
- run:
name: lint
command: |
# substitute by foo only if bar is empty
bar_or_foo=`[ -n "<< parameters.bar >>" ] && echo "<< parameters.bar >>" || echo "<< parameters.foo >>"`
whatever $bar_or_foo