microsoft / microsoft/typespec

`@encodedName` with same name of property emit error

Open
#2,911 1 comment 0 reactions 0 assignees View on GitHub
triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

While technically useless I am not sure this should be an error
```tsp
model Foo {
@encodedName("application/json", "foo")
foo: string;
}
```

```
error encoded-name-conflict Encoded name 'foo' conflicts with existing member name for mime type 'application/json'
```

[Playground Link](https://typespec.io/playground?c=bW9kZWwgRm9vIHsKICBAZW5jb2RlZE5hbWUoImFwcGxpY2F0aW9uL2pzb24iLCAiZm9vIikKICBmb286IHN0cmluZzsKfQ%3D%3D&e=%40typespec%2Fopenapi3&options=%7B%7D)

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.