Skip to content

no-empty-model

-
@azure-tools/typespec-azure-resource-manager/no-empty-model

ARM Properties with type:object that don’t reference a model definition are not allowed. ARM doesn’t allow generic type definitions as this leads to bad customer experience.

❌ Incorrect

model Information {
address: {};
}

❌ Incorrect

model Empty {}

βœ… Correct

model Information {
address: Address;
}
model Address {
street: string;
city: string;
state: string;
country: string;
postalCode: string;
}

βœ… Correct

model Information {
street: string;
city: string;
state: string;
country: string;
postalCode: string;
}