Skip to content

Commit

Permalink
fix: improve error message when skip unwrap is required for body para…
Browse files Browse the repository at this point in the history
…meter
  • Loading branch information
kakha urigashvili authored and RonWang committed May 12, 2020
1 parent 66834ac commit 34d7db8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/commands/smapi/cli-customization-processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ class CliCustomizationProcessor {
if (property.$ref) {
const schema = this._getDefinitionSchema(property.$ref, definitions);
if (!schema.enum) {
throw new CliError('Cannot unwrap more then 2 levels deep. Please use customParameters or set skipUnwrap.');
throw new CliError('Cannot unwrap more then 2 levels deep. Please use customParameters or '
+ `set skipUnwrap for parameter ${rootName} in lib/commands/smapi/customizations/parameters.json.`);
}
enumOptions = schema.enum;
description = schema.description || description;
Expand Down

0 comments on commit 34d7db8

Please sign in to comment.