no-legacy-usage
@azure-tools/typespec-azure-core/no-legacy-usageLinter warning against using elements from the Legacy namespace
Types, decorators and other constructs from located under a .Legacy namespace are considered legacy and should not be used in new code. The only acceptable usage is for brownfield services which have their existing pattern grandfathered in.
Impact
Section titled “Impact”- Area: API, SDK
Indicates use of legacy patterns instead of the current standard patterns.
❌ Incorrect
Section titled “❌ Incorrect”model Pet { @Azure.ClientGenerator.Core.Legacy.flattenProperty name: PetProperties;}model Page { @nextLink nextLink: Azure.Core.Legacy.parameterizedNextLink<[ ListCertificateOptions.includePending ]>;}✅ Correct
Section titled “✅ Correct”model Pet { name: PetProperties;}model Page { @nextLink nextLink: url;}Suppression
Section titled “Suppression”Suppress only when required to match an existing API; otherwise use the standard types and templates.