As I may have mentioned before, I've got a CLI with options generated based on a JSON Schema. To ensure the names don't clash (e.g. if there's an option called execute) all option properties are prefixed with option_. Validation errors contain this option name, which is confusing.
Even without my weird naming, I would argue that showing the actually used option rather than the property name is more user friendly.
Before:
ai build all --unknown-target foo
Usage Error: Invalid option validation for option_unknownTarget: expected a valid enumeration value (got "foo")
After:
ai build all --unknown-target foo
Usage Error: Invalid option validation for --unknown-target: expected a valid enumeration value (got "foo")
As I may have mentioned before, I've got a CLI with options generated based on a JSON Schema. To ensure the names don't clash (e.g. if there's an option called
execute
) all option properties are prefixed withoption_
. Validation errors contain this option name, which is confusing.Even without my weird naming, I would argue that showing the actually used option rather than the property name is more user friendly.
Before:
After: