microsoft / microsoft/typespec

Should `@friendlyName` emit a warning if not used on a template

Open
#2,102 4 comments 0 reactions 0 assignees View on GitHub
breaking-change
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

Goal of @friendlyname is to provide a unique name to the template instance. And I think it can easily be misused somewhere else to rename a property or model in the client(Has been many times in the past)

Think we should emit a warning and recommend to use `@projectedName` as it is probably what they want.

Additionally we should emit a warning if the friendly name is not using the template parameter in its name which would result in a conflicts

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.