diff --git a/powershell/cmdlets/class.ts b/powershell/cmdlets/class.ts index febc15e7298..02a10b162d9 100644 --- a/powershell/cmdlets/class.ts +++ b/powershell/cmdlets/class.ts @@ -2469,7 +2469,7 @@ export class NewCmdletClass extends Class { } const isEnum = propertyType.schema.language.csharp?.enum !== undefined; - const hasEnum = propertyType instanceof ArrayOf && propertyType.elementType instanceof NewEnumImplementation; + const hasEnum = propertyType instanceof NewArrayOf && propertyType.elementType instanceof NewEnumImplementation; if (isEnum || hasEnum) { cmdletParameter.add(new Attribute(ArgumentCompleterAttribute, { parameters: [`typeof(${hasEnum ? (propertyType).elementType.declaration : propertyType.declaration})`] })); } @@ -2614,7 +2614,7 @@ export class NewCmdletClass extends Class { } const isEnum = propertyType.schema.language.csharp?.enum !== undefined; - const hasEnum = propertyType instanceof ArrayOf && propertyType.elementType instanceof NewEnumImplementation; + const hasEnum = propertyType instanceof NewArrayOf && propertyType.elementType instanceof NewEnumImplementation; if (isEnum || hasEnum) { regularCmdletParameter.add(new Attribute(ArgumentCompleterAttribute, { parameters: [`typeof(${hasEnum ? (propertyType).elementType.declaration : propertyType.declaration})`] })); } diff --git a/powershell/llcsharp/schema/schema-resolver.ts b/powershell/llcsharp/schema/schema-resolver.ts index 3a667eb239a..7efda43ca1b 100644 --- a/powershell/llcsharp/schema/schema-resolver.ts +++ b/powershell/llcsharp/schema/schema-resolver.ts @@ -184,6 +184,7 @@ export class NewSchemaDefinitionResolver { return this.add(schema, new NewObjectImplementation(schema)); } case SchemaType.Time: + case SchemaType.Credential: case SchemaType.String: { return new NewString(schema, required);