Wrong option name
I noticed that this is the only spo field ... command that uses --name instead of --fieldTitle. So I think it is better that we mark this option as deprecated and introduce a new option -t, --fieldTitle [fieldTitle].
What should be done:
- Introduce new option
-t, fieldTitle
- Mark option
--name as deprecated
- Mark as depracated on documentation.
- Create new issue to remove
--name as option in CLI v6
Example how to mark option as deprecated
|
if (args.options.id) { |
|
this.warn(logger, `Option 'id' is deprecated. Please use 'listId' instead.`); |
|
} |
|
if (args.options.title) { |
|
this.warn(logger, `Option 'title' is deprecated. Please use 'listTitle' instead.`); |
|
} |
Wrong validation message
Noticed that the command spo field set has a wrong validation message:
|
if (args.options.id && args.options.name) { |
|
return `Specify viewId or viewTitle but not both`; |
|
} |
Validation message should be: Specify id or fieldTitle but not both (because name will be replaced by fieldTitle).
Wrong option name
I noticed that this is the only
spo field ...command that uses--nameinstead of--fieldTitle. So I think it is better that we mark this option as deprecated and introduce a new option-t, --fieldTitle [fieldTitle].What should be done:
-t, fieldTitle--nameas deprecated--nameas option in CLI v6Example how to mark option as deprecated
cli-microsoft365/src/m365/spo/commands/listitem/listitem-list.ts
Lines 54 to 59 in a467afc
Wrong validation message
Noticed that the command
spo field sethas a wrong validation message:cli-microsoft365/src/m365/spo/commands/field/field-set.ts
Lines 202 to 204 in d09de0f
Validation message should be:
Specify id or fieldTitle but not both(becausenamewill be replaced byfieldTitle).