ITADN

Broken generation for an api named "Public"

#1102Closeddammitjanet 创建于 2026-06-01
bug
D
dammitjanetcommented
**Describe the bug** Under refitter 2.0.0, generating an API that in previous versions (<= 1.7.3) returned an interface named IPublicApi, but in 2.0.0 results in an invalid interface name I@publicApi ` [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.7.3.0")] public partial interface IPublicApi { [Headers("Accept: application/json")] [Get("/api/public/price-list")] Task<HttpResponseMessage> GetPriceListGETAsync(CancellationToken cancellationToken = default); }` ` [System.CodeDom.Compiler.GeneratedCode("Refitter", "2.0.0.0")] public partial interface I@publicApi { [Headers("Accept: application/json")] [Get("/api/public/price-list")] Task<HttpResponseMessage> GetPriceListGETAsync(CancellationToken cancellationToken = default); }` **Support Key**: `7l7irxz]` **OpenAPI Specifications** [test.json](https://github.com/user-attachments/files/28467541/test.json) Please note that this is only part of the specification, unfortunately I cannot share the rest, however this is the ONLY method on the interface **Additional context** <img width="1454" height="855" alt="Image" src="https://github.com/user-attachments/assets/967b1a6a-75c2-464e-a692-ac0ccfbbc6cd" /> I have downgraded to 1.7.3 after updating to 2.0.0 and the issue is resolved and is present in 2.0.0
关闭于 2026-06-02 6 条评论