Skip to content

arm-custom-resource-no-key

-
@azure-tools/typespec-azure-resource-manager/arm-custom-resource-no-key

Custom Azure resource models must define a key property using the @key decorator, especially if the custom resource will be used in operations. Without a key, operation paths may be duplicated.

@Azure.ResourceManager.Legacy.customAzureResource
model CustomResource {
someId: string;
}
@Azure.ResourceManager.Legacy.customAzureResource
model CustomResource {
@key
someId: string;
}