Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion powershell/plugins/plugin-create-inline-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function createVirtualProperties(schema: ObjectSchema, stack: Array<string>, 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,
Expand Down
4 changes: 2 additions & 2 deletions powershell/utils/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -138,7 +138,7 @@ export function getPolymorphicBases(schema: Schema): Array<Schema> {
}

export function getAllProperties(schema: Schema): Array<Property> {
if (schema instanceof ObjectSchema) {
if (isObjectSchema(schema)) {
return [...values(schema.parents ? schema.parents.immediate : []).selectMany(getAllProperties), ...values(schema.properties)];
} else {
return [];
Expand Down
9 changes: 6 additions & 3 deletions tests-upgrade/Configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down