Skip to content

missing-x-ms-identifiers

Id
@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers

Array properties should describe their identifying properties with x-ms-identifiers. Decorate the property with @OpenAPI.extension(“x-ms-identifiers”, #[id-prop]) where “id-prop” is a list of the names of identifying properties in the item type.

Identifiers let downstream OpenAPI and SDK tooling correlate items in array-valued model properties.

  • Area: API

An old-pattern warning with no real runtime impact.

This rule corresponds to the LintDiff rule XmsIdentifierValidation (warning).

model Address {
city: string;
street: string;
}
model ResourceProperties {
array: Address[];
}
model ResourceProperties {
@identifiers(#["city", "street"])
array: Address[];
}

Suppress at will.