Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AutoRest C# version to 3.0.0-beta.20230721.1 #37770

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,8 @@
"Zilla",
"Guage",
"Plex",
"Vstsrm"
"Vstsrm",
"Localizable"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
All should have PrivateAssets="All" set so they don't become package dependencies
-->
<ItemGroup>
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230720.1" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230721.1" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20230131.1" PrivateAssets="All" />
<PackageReference Update="coverlet.collector" Version="3.2.0" PrivateAssets="All" />
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.1" PrivateAssets="All" />
Expand Down
2 changes: 1 addition & 1 deletion eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-csharp": "0.2.0-beta.20230720.1"
"@azure-tools/typespec-csharp": "0.2.0-beta.20230721.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ clear-output-folder: true
skip-csproj: true
modelerfour:
flatten-payloads: false
deserialize-null-collection-as-null-value: true

no-property-type-replacement: RegenerateKeyContent

Expand Down
5 changes: 3 additions & 2 deletions sdk/batch/Azure.ResourceManager.Batch/src/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ clear-output-folder: true
skip-csproj: true
modelerfour:
flatten-payloads: false
deserialize-null-collection-as-null-value: true

# mgmt-debug:
# mgmt-debug:
# show-serialized-names: true

format-by-name-rules:
Expand Down Expand Up @@ -189,7 +190,7 @@ rename-mapping:
AccountKeyType: BatchAccountKeyType
BatchAccountRegenerateKeyParameters.keyName: KeyType
Certificate.properties.thumbprint: ThumbprintString
CertificateCreateOrUpdateParameters.properties.thumbprint: ThumbprintString
CertificateCreateOrUpdateParameters.properties.thumbprint: ThumbprintString

directive:
# TODO -- remove this and use rename-mapping when it is supported
Expand Down
5 changes: 3 additions & 2 deletions sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ clear-output-folder: true
skip-csproj: true
modelerfour:
flatten-payloads: false
deserialize-null-collection-as-null-value: true

operation-id-mappings:
CdnEndpoint:
Expand Down Expand Up @@ -62,7 +63,7 @@ rename-rules:
SHA256: Sha256
EndpointPropertiesUpdateParametersDeliveryPolicy: EndpointDeliveryPolicy

no-property-type-replacement:
no-property-type-replacement:
- ContinentsResponseContinentsItem
- EndpointPropertiesUpdateParametersDefaultOriginGroup
- EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink
Expand Down Expand Up @@ -90,7 +91,7 @@ rename-mapping:
CacheLevel: CdnCacheLevel
SslProtocol: DeliveryRuleSslProtocol
SslProtocolMatchCondition: DeliveryRuleSslProtocolMatchCondition

directive:
- from: swagger-document
where: $.definitions..parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ clear-output-folder: true
skip-csproj: true
modelerfour:
flatten-payloads: false
deserialize-null-collection-as-null-value: true

#mgmt-debug:
#mgmt-debug:
# show-serialized-names: true

format-by-name-rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ clear-output-folder: true
skip-csproj: true
modelerfour:
flatten-payloads: false
deserialize-null-collection-as-null-value: true

rename-mapping:
AzureDataExplorerConnectionProperties.adxResourceId: -|arm-id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
deserialize-null-collection-as-null-value: true
batch:
- tag: release_2_1
- tag: 2023-02-28-preview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ clear-output-folder: true
skip-csproj: true
modelerfour:
flatten-payloads: false
deserialize-null-collection-as-null-value: true

override-operation-name:
Endpoints_PurgeContent: PurgeContent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ clear-output-folder: true
skip-csproj: true
modelerfour:
flatten-payloads: false
deserialize-null-collection-as-null-value: true

request-path-to-resource-name:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}: GuestConfigurationVmAssignment
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ clear-output-folder: true
skip-csproj: true
modelerfour:
flatten-payloads: false
deserialize-null-collection-as-null-value: true

format-by-name-rules:
'tenantId': 'uuid'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ clear-output-folder: true
skip-csproj: true
modelerfour:
flatten-payloads: false
deserialize-null-collection-as-null-value: true

format-by-name-rules:
'tenantId': 'uuid'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ clear-output-folder: true
skip-csproj: true
modelerfour:
flatten-payloads: false
deserialize-null-collection-as-null-value: true

format-by-name-rules:
"tenantId": "uuid"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public static partial class AzureOpenAIModelFactory
{
public static Azure.AI.OpenAI.ChatChoice ChatChoice(Azure.AI.OpenAI.ChatMessage message = null, int index = 0, Azure.AI.OpenAI.CompletionsFinishReason finishReason = default(Azure.AI.OpenAI.CompletionsFinishReason), Azure.AI.OpenAI.ChatMessage deltaMessage = null, Azure.AI.OpenAI.ContentFilterResults contentFilterResults = null) { throw null; }
public static Azure.AI.OpenAI.ChatCompletions ChatCompletions(string id = null, System.DateTimeOffset created = default(System.DateTimeOffset), System.Collections.Generic.IEnumerable<Azure.AI.OpenAI.ChatChoice> choices = null, System.Collections.Generic.IEnumerable<Azure.AI.OpenAI.PromptFilterResult> promptFilterResults = null, Azure.AI.OpenAI.CompletionsUsage usage = null) { throw null; }
public static Azure.AI.OpenAI.Choice Choice(string text = null, int index = 0, Azure.AI.OpenAI.ContentFilterResults contentFilterResults = null, Azure.AI.OpenAI.CompletionsLogProbabilityModel logProbabilityModel = null, Azure.AI.OpenAI.CompletionsFinishReason finishReason = default(Azure.AI.OpenAI.CompletionsFinishReason)) { throw null; }
public static Azure.AI.OpenAI.Choice Choice(string text = null, int index = 0, Azure.AI.OpenAI.ContentFilterResults contentFilterResults = null, Azure.AI.OpenAI.CompletionsLogProbabilityModel logProbabilityModel = null, Azure.AI.OpenAI.CompletionsFinishReason? finishReason = default(Azure.AI.OpenAI.CompletionsFinishReason?)) { throw null; }
public static Azure.AI.OpenAI.Completions Completions(string id = null, System.DateTimeOffset created = default(System.DateTimeOffset), System.Collections.Generic.IEnumerable<Azure.AI.OpenAI.PromptFilterResult> promptFilterResults = null, System.Collections.Generic.IEnumerable<Azure.AI.OpenAI.Choice> choices = null, Azure.AI.OpenAI.CompletionsUsage usage = null) { throw null; }
public static Azure.AI.OpenAI.CompletionsLogProbabilityModel CompletionsLogProbabilityModel(System.Collections.Generic.IEnumerable<string> tokens = null, System.Collections.Generic.IEnumerable<float?> tokenLogProbabilities = null, System.Collections.Generic.IEnumerable<System.Collections.Generic.IDictionary<string, float?>> topLogProbabilities = null, System.Collections.Generic.IEnumerable<int> textOffsets = null) { throw null; }
public static Azure.AI.OpenAI.CompletionsUsage CompletionsUsage(int completionTokens = 0, int promptTokens = 0, int totalTokens = 0) { throw null; }
Expand All @@ -25,7 +25,7 @@ public partial class ChatChoice
{
internal ChatChoice() { }
public Azure.AI.OpenAI.ContentFilterResults ContentFilterResults { get { throw null; } }
public Azure.AI.OpenAI.CompletionsFinishReason FinishReason { get { throw null; } }
public Azure.AI.OpenAI.CompletionsFinishReason? FinishReason { get { throw null; } }
public int Index { get { throw null; } }
public Azure.AI.OpenAI.ChatMessage Message { get { throw null; } }
}
Expand Down Expand Up @@ -88,7 +88,7 @@ public partial class Choice
{
internal Choice() { }
public Azure.AI.OpenAI.ContentFilterResults ContentFilterResults { get { throw null; } }
public Azure.AI.OpenAI.CompletionsFinishReason FinishReason { get { throw null; } }
public Azure.AI.OpenAI.CompletionsFinishReason? FinishReason { get { throw null; } }
public int Index { get { throw null; } }
public Azure.AI.OpenAI.CompletionsLogProbabilityModel LogProbabilityModel { get { throw null; } }
public string Text { get { throw null; } }
Expand Down Expand Up @@ -315,7 +315,7 @@ internal PromptFilterResult() { }
public partial class StreamingChatChoice
{
internal StreamingChatChoice() { }
public Azure.AI.OpenAI.CompletionsFinishReason FinishReason { get { throw null; } }
public Azure.AI.OpenAI.CompletionsFinishReason? FinishReason { get { throw null; } }
public int? Index { get { throw null; } }
public System.Collections.Generic.IAsyncEnumerable<Azure.AI.OpenAI.ChatMessage> GetMessageStreaming([System.Runtime.CompilerServices.EnumeratorCancellationAttribute] System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
Expand All @@ -331,7 +331,7 @@ protected virtual void Dispose(bool disposing) { }
public partial class StreamingChoice
{
internal StreamingChoice() { }
public Azure.AI.OpenAI.CompletionsFinishReason FinishReason { get { throw null; } }
public Azure.AI.OpenAI.CompletionsFinishReason? FinishReason { get { throw null; } }
public int? Index { get { throw null; } }
public Azure.AI.OpenAI.CompletionsLogProbabilityModel LogProbabilityModel { get { throw null; } }
public System.Collections.Generic.IAsyncEnumerable<string> GetTextStreaming([System.Runtime.CompilerServices.EnumeratorCancellationAttribute] System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class StreamingChatChoice
/// Normal termination typically provides "stop" and encountering token limits in a request typically
/// provides "length." If no value is present, this StreamingChoice is still in progress.
/// </remarks>
public CompletionsFinishReason FinishReason => GetLocked(() => _baseChoices.Last().FinishReason);
public CompletionsFinishReason? FinishReason => GetLocked(() => _baseChoices.Last().FinishReason);

internal ChatMessage StreamingDeltaMessage { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion sdk/openai/Azure.AI.OpenAI/src/Custom/StreamingChoice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class StreamingChoice
/// Normal termination typically provides "stop" and encountering token limits in a request typically
/// provides "length." If no value is present, this StreamingChoice is still in progress.
/// </remarks>
public CompletionsFinishReason FinishReason => GetLocked(() => _baseChoices.Last().FinishReason);
public CompletionsFinishReason? FinishReason => GetLocked(() => _baseChoices.Last().FinishReason);

internal bool StreamingDoneSignalReceived
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions sdk/openai/Azure.AI.OpenAI/src/Generated/ChatChoice.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading