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.
Define a named model with explicit properties instead of a generic object shape so clients and OpenAPI consumers see a concrete schema.
Impact
Section titled “Impact”- Area: API, SDK
A model that accepts any schema is difficult to use from both the API and generated SDKs.
LintDiff Equivalent
Section titled “LintDiff Equivalent”This rule corresponds to the LintDiff rule MissingTypeObject.
❌ 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;}Suppression
Section titled “Suppression”Suppress only when required to match an existing API; otherwise use a defined type.