friendly-name
@azure-tools/typespec-azure-core/friendly-nameEnsures that @friendlyName is used as intended. The @friendlyName decorator should only be applied to template declarations and should reference template parameter properties in the friendly name string.
โ Incorrect
Section titled โโ IncorrectโUsing @friendlyName on a non-template type:
@friendlyName("FriendlyModel")model TestModel {}@friendlyName("FriendlyEnum")enum TestEnum { Foo, Bar,}Using @friendlyName on a template without referencing template parameters:
@friendlyName("FriendlyUpdate")op updateTemplate<T>(body: T): T;โ Correct
Section titled โโ CorrectโUsing @friendlyName on a template with template parameter references:
@friendlyName("{name}Page", T)model Page<T> { size: int32; item: T[];}@friendlyName("List{name}", T)op listTemplate<T>(): Page<T>;