Preview ServiceVersions should use PascalCase #24150
Labels
Client
This issue points to a problem in the data-plane of the library.
Cognitive - Personalizer
DPG
Based on .NET guidelines for capitalization, preview
ServiceVersion
values should be PascalCase, e.g. "V2021_09_21_Preview" instead of "V2021_09_21_preview". This violates the AZC0016 analyzer recently added to catch cases like this.At this time, this is caused by a generator bug but, even when fixed, you should consider whether this introduces an undesirable breaking change. For example, if you've already shipped to customers but haven't changed the preview version, you may want to keep it by redefining the same class outside the "Generated" folder.
The easiest way is to move the entire options class that defines your
ServiceVersion
to the project folder outside the "Generated" folder and next to your client class. When the code is generated again, this class will not be re-generated and you fully own all updates. This is often desirable when you have to maintain multiple versions as well, such as after you ship your first GA and want to ship another preview of GA, or even if you support multiple previews.If you are able to rename the value to use the uppercase "_Preview" suffix, please remove the GlobalSuppressions.cs file added to your project in PR #23793.
The text was updated successfully, but these errors were encountered: