-
Couldn't load subscription status.
- Fork 317
Description
Describe the bug
When using both decorators @visibility and @encodedName on a property of a model, and using the model in an operation with an explicit visibilty transform, an error occurs: "encoded-name-conflict Same encoded name 'some_name' is used for 2 members 'application/json'".
The issue does not occur when using @typespec/http's automatic visibility inclusion: the proper property is included and its name is properly encoded. The operation has to use a Transform such as Read<T> for the issue to come up.
Using explicit visibility transforms is not discouraged in the documentation, but no example is provided of them combined with encoded names. Is this a known limitation? Are there any workarounds?
Reproduction
Checklist
- Follow our Code of Conduct
- Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.