diff --git a/powershell/plugins/plugin-create-inline-properties.ts b/powershell/plugins/plugin-create-inline-properties.ts index 07ecf13568..061b706cc9 100644 --- a/powershell/plugins/plugin-create-inline-properties.ts +++ b/powershell/plugins/plugin-create-inline-properties.ts @@ -210,7 +210,7 @@ function createVirtualProperties(schema: ObjectSchema, stack: Array, thr property: inlinedProperty.property, private: inlinedProperty.private, nameComponents: components, - nameOptions: getNameOptions(inlinedProperty.property.schema.details.default.name, components), + nameOptions: getNameOptions(inlinedProperty.property.schema.language.default.name, components), accessViaProperty: privateProperty, accessViaMember: inlinedProperty, accessViaSchema: schema, diff --git a/powershell/utils/schema.ts b/powershell/utils/schema.ts index c540ac8772..c4117d84a6 100644 --- a/powershell/utils/schema.ts +++ b/powershell/utils/schema.ts @@ -8,7 +8,7 @@ import { Extensions } from './extensions'; import { DeepPartial, } from '@azure-tools/codegen'; import { Dictionary, values } from '@azure-tools/linq'; import { uid } from './uid'; -import { Schema, ObjectSchema, Property, SchemaType } from '@azure-tools/codemodel'; +import { Schema, ObjectSchema, Property, SchemaType, isObjectSchema } from '@azure-tools/codemodel'; import { NewEnhancedTypeDeclaration } from '../llcsharp/schema/extended-type-declaration'; import { NewModelClass } from '../llcsharp/model/model-class'; import { NewModelInterface } from '../llcsharp/model/interface'; @@ -138,7 +138,7 @@ export function getPolymorphicBases(schema: Schema): Array { } export function getAllProperties(schema: Schema): Array { - if (schema instanceof ObjectSchema) { + if (isObjectSchema(schema)) { return [...values(schema.parents ? schema.parents.immediate : []).selectMany(getAllProperties), ...values(schema.properties)]; } else { return []; diff --git a/tests-upgrade/Configuration.json b/tests-upgrade/Configuration.json index 6ad6ceb5e7..fa0be4b88c 100644 --- a/tests-upgrade/Configuration.json +++ b/tests-upgrade/Configuration.json @@ -9,11 +9,14 @@ "basic-response-multioperation", "basic-spec-required", "basic-spec-root", - "datamodels-datatypes-array", - "component-param", + "component-definitions-local", "component-multiparam", + "component-param", + "component-param-inbody", "component-param-localremote", - "component-param-inbody" + "component-param-remote", + "datamodels-datatypes-array", + "datamodels-datatypes-integer" ], "BlackList": [ "basic-get-querystr",