no-empty-model
@azure-tools/typespec-azure-resource-manager/no-empty-modelARM 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
Section titled “❌ Incorrect”model Information { address: {};}❌ Incorrect
Section titled “❌ Incorrect”model Empty {}✅ Correct
Section titled “✅ Correct”model Information { address: Address;}
model Address { street: string; city: string; state: string; country: string; postalCode: string;}✅ Correct
Section titled “✅ Correct”model Information { street: string; city: string; state: string; country: string; postalCode: string;}Reviewer advice
Section titled “Reviewer advice”Impacts the API and generated SDKs: this corresponds to the LintDiff rule MissingTypeObject and makes the schema too broad because any schema is accepted. Ask the author to use a defined type instead. Do not accept a suppression unless it is needed to match existing APIs.