diff --git a/packages/config/src/ProfileInfo.ts b/packages/config/src/ProfileInfo.ts index f663b512b..5b31b37d3 100644 --- a/packages/config/src/ProfileInfo.ts +++ b/packages/config/src/ProfileInfo.ts @@ -623,7 +623,8 @@ export class ProfileInfo { dataType: this.argDataType(typeof propVal), // TODO Is using `typeof` bad for "null" values that may be int or bool? argValue: propVal, argLoc, - secure + secure, + offSchema: true }); } } @@ -654,7 +655,8 @@ export class ProfileInfo { dataType: this.argDataType(typeof propVal), argValue: propVal, argLoc, - secure + secure, + offSchema: true }); } } @@ -746,6 +748,7 @@ export class ProfileInfo { dataType: this.argDataType(propInfoInSchema.type), argValue: (propInfoInSchema as ICommandProfileProperty).optionDefinition?.defaultValue, argLoc, + offSchema: false, // See https://github.com/zowe/imperative/issues/739 secure: foundInSecureArray || propInfoInSchema.secure }; @@ -760,6 +763,7 @@ export class ProfileInfo { if (!argFound) { mergedArgs.missingArgs.push({ argName: propName, + offSchema: false, dataType: this.argDataType(propInfoInSchema.type), argValue: (propInfoInSchema as ICommandProfileProperty).optionDefinition?.defaultValue, argLoc: { locType: ProfLocType.DEFAULT }, @@ -767,6 +771,7 @@ export class ProfileInfo { }); } } else { + knownArg.offSchema = false; knownArg.secure = knownArg.secure ?? propInfoInSchema.secure; if (knownArg.secure) { delete knownArg.argValue; diff --git a/packages/config/src/doc/IProfArgAttrs.ts b/packages/config/src/doc/IProfArgAttrs.ts index f227b2bed..370dda3d4 100644 --- a/packages/config/src/doc/IProfArgAttrs.ts +++ b/packages/config/src/doc/IProfArgAttrs.ts @@ -35,4 +35,7 @@ export interface IProfArgAttrs { /** Whether the argument value is stored securely */ secure?: boolean; + + /** Whether the argument value is defined in the schema file */ + offSchema?: boolean; }