Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.26k stars 4.61k forks source link

Add x-ms-enum.modelAsString=false to single value enums in Azure.Analytics.Synapse.Artifacts #24631

Closed AlexanderSher closed 5 months ago

AlexanderSher commented 2 years ago

seal-single-value-enum-by-default in autorest.md is a temporary flag. When it stops working, enums with single value will no longer be treated as constants. To avoid this, add x-ms-enum.modelAsString=false to all enums that should remain constants, e.g.: e.g.: https://github.com/Azure/autorest.csharp/blob/25d9b624ae1e6c5faf65fbb8176e718f85c6b4c8/test/TestProjects/BodyAndPath-LowLevel/BodyAndPath-LowLevel.json#L106 (in this example, however, parameter is still created cause EnumName2 has 2 values).

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @wonner, @yanjungao718.

Issue Details
`seal-single-value-enum-by-default` in `autorest.md` is a temporary flag. When it stops working, enums with single value will no longer be treated as constants. To avoid this, add `x-ms-enum.modelAsString=false` to all enums that should remain constants, e.g.: e.g.: https://github.com/Azure/autorest.csharp/blob/25d9b624ae1e6c5faf65fbb8176e718f85c6b4c8/test/TestProjects/BodyAndPath-LowLevel/BodyAndPath-LowLevel.json#L106 (in this example, however, parameter is still created cause EnumName2 has 2 values).
Author: AlexanderSher
Assignees: -
Labels: `Service Attention`, `Client`, `Synapse`
Milestone: -
github-actions[bot] commented 6 months ago

Hi @AlexanderSher, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

github-actions[bot] commented 5 months ago

Hi @AlexanderSher, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.