Skip to content

Commit

Permalink
bump version for tsp and tcgc (#5221)
Browse files Browse the repository at this point in the history
  • Loading branch information
live1206 authored Jan 17, 2025
1 parent db9cf84 commit 440b150
Show file tree
Hide file tree
Showing 44 changed files with 7,618 additions and 745 deletions.
286 changes: 144 additions & 142 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"url": "https://github.com/Azure/autorest.csharp/issues"
},
"devDependencies": {
"@typespec/http-specs": "0.1.0-alpha.5",
"@azure-tools/azure-http-specs": "0.1.0-alpha.4",
"@azure-tools/typespec-client-generator-core": "0.49.1",
"@azure-tools/typespec-azure-resource-manager": "0.49.0",
"@typespec/http-specs": "0.1.0-alpha.7",
"@azure-tools/azure-http-specs": "0.1.0-alpha.5",
"@azure-tools/typespec-client-generator-core": "0.50.0",
"@azure-tools/typespec-azure-resource-manager": "0.50.0",
"@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp",
"@azure-tools/unbranded-tests": "file:test/UnbrandedProjects",
"@microsoft.azure/autorest.testserver": "3.3.50",
Expand Down
3 changes: 2 additions & 1 deletion samples/AnomalyDetector/tspCodeModel.json
Original file line number Diff line number Diff line change
Expand Up @@ -26479,7 +26479,8 @@
"$id": "3499",
"ApiKey": {
"$id": "3500",
"Name": "Ocp-Apim-Subscription-Key"
"Name": "Ocp-Apim-Subscription-Key",
"In": "header"
}
}
}
48 changes: 24 additions & 24 deletions src/TypeSpec.Extension/Emitter.Csharp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,40 +35,40 @@
],
"dependencies": {
"@autorest/csharp": "3.0.0-beta.20240625.4",
"@typespec/http-client-csharp": "0.1.9-alpha.20250108.2"
"@typespec/http-client-csharp": "0.1.9-alpha.20250116.6"
},
"peerDependencies": {
"@azure-tools/typespec-azure-core": ">=0.49.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.49.0 <1.0.0",
"@azure-tools/typespec-azure-resource-manager": ">=0.49.0 <1.0.0",
"@azure-tools/typespec-azure-rulesets": ">=0.49.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.49.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.50.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.50.0 <1.0.0",
"@azure-tools/typespec-azure-resource-manager": ">=0.50.0 <1.0.0",
"@azure-tools/typespec-azure-rulesets": ">=0.50.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.50.0 <1.0.0",
"@azure-tools/typespec-liftr-base": ">=0.6.0 <1.0.0",
"@typespec/compiler": ">=0.63.0 <1.0.0",
"@typespec/http": ">=0.63.0 <1.0.0",
"@typespec/openapi": ">=0.63.0 <1.0.0",
"@typespec/rest": ">=0.63.0 <1.0.0",
"@typespec/versioning": ">=0.63.0 <1.0.0",
"@typespec/xml": ">=0.63.0 <1.0.0"
"@typespec/compiler": ">=0.64.0 <1.0.0",
"@typespec/http": ">=0.64.0 <1.0.0",
"@typespec/openapi": ">=0.64.0 <1.0.0",
"@typespec/rest": ">=0.64.0 <1.0.0",
"@typespec/versioning": ">=0.64.0 <1.0.0",
"@typespec/xml": ">=0.64.0 <1.0.0"
},
"devDependencies": {
"@azure-tools/typespec-azure-core": "0.49.0",
"@azure-tools/typespec-client-generator-core": "0.49.1",
"@azure-tools/typespec-azure-resource-manager": "0.49.0",
"@azure-tools/typespec-azure-rulesets": "0.49.0",
"@azure-tools/typespec-autorest": "0.49.0",
"@azure-tools/typespec-azure-core": "0.50.0",
"@azure-tools/typespec-client-generator-core": "0.50.0",
"@azure-tools/typespec-azure-resource-manager": "0.50.0",
"@azure-tools/typespec-azure-rulesets": "0.50.0",
"@azure-tools/typespec-autorest": "0.50.0",
"@azure-tools/typespec-liftr-base": "0.6.0",
"@eslint/js": "^9.15.0",
"@types/mocha": "~10.0.9",
"@types/node": "~22.7.9",
"@types/prettier": "^2.6.3",
"@typespec/compiler": "0.63.0",
"@typespec/http": "0.63.0",
"@typespec/library-linter": "0.63.0",
"@typespec/openapi": "0.63.0",
"@typespec/rest": "0.63.1",
"@typespec/versioning": "0.63.0",
"@typespec/xml": "0.63.0",
"@typespec/compiler": "0.64.0",
"@typespec/http": "0.64.0",
"@typespec/library-linter": "0.64.0",
"@typespec/openapi": "0.64.0",
"@typespec/rest": "0.64.0",
"@typespec/versioning": "0.64.0",
"@typespec/xml": "0.64.0",
"eslint": "^9.15.0",
"globals": "^15.2.0",
"prettier": "^3.3.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@
"$id": "18",
"ApiKey": {
"$id": "19",
"Name": "x-ms-api-key"
"Name": "x-ms-api-key",
"In": "header"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
"ApiKey": {
"$id": "19",
"Name": "Authorization",
"In": "header",
"Prefix": "SharedAccessKey"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@
"$id": "12",
"ApiKey": {
"$id": "13",
"Name": "x-ms-api-key"
"Name": "x-ms-api-key",
"In": "header"
},
"OAuth2": {
"$id": "14",
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 @@ -5,6 +5,10 @@

#nullable disable

using System;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.ResourceManager;

Expand Down Expand Up @@ -35,6 +39,78 @@ private string GetApiVersionOrNull(ResourceType resourceType)
return apiVersion;
}

/// <summary> Gets a collection of ExtensionsResources in the ArmClient. </summary>
/// <param name="scope"> The scope that the resource will apply against. </param>
/// <returns> An object representing collection of ExtensionsResources and their operations over a ExtensionsResource. </returns>
public virtual ExtensionsResourceCollection GetExtensionsResources(ResourceIdentifier scope)
{
return new ExtensionsResourceCollection(Client, scope);
}

/// <summary>
/// Get a ExtensionsResource
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/{resourceUri}/providers/Azure.ResourceManager.Resources/extensionsResources/{extensionsResourceName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>ExtensionsResource_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-12-01-preview</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="ExtensionsResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="scope"> The scope that the resource will apply against. </param>
/// <param name="extensionsResourceName"> The name of the ExtensionsResource. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="extensionsResourceName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="extensionsResourceName"/> is an empty string, and was expected to be non-empty. </exception>
[ForwardsClientCalls]
public virtual async Task<Response<ExtensionsResource>> GetExtensionsResourceAsync(ResourceIdentifier scope, string extensionsResourceName, CancellationToken cancellationToken = default)
{
return await GetExtensionsResources(scope).GetAsync(extensionsResourceName, cancellationToken).ConfigureAwait(false);
}

/// <summary>
/// Get a ExtensionsResource
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/{resourceUri}/providers/Azure.ResourceManager.Resources/extensionsResources/{extensionsResourceName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>ExtensionsResource_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-12-01-preview</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="ExtensionsResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="scope"> The scope that the resource will apply against. </param>
/// <param name="extensionsResourceName"> The name of the ExtensionsResource. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="extensionsResourceName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="extensionsResourceName"/> is an empty string, and was expected to be non-empty. </exception>
[ForwardsClientCalls]
public virtual Response<ExtensionsResource> GetExtensionsResource(ResourceIdentifier scope, string extensionsResourceName, CancellationToken cancellationToken = default)
{
return GetExtensionsResources(scope).Get(extensionsResourceName, cancellationToken);
}

/// <summary>
/// Gets an object representing a <see cref="TopLevelTrackedResource"/> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="TopLevelTrackedResource.CreateResourceIdentifier" /> to create a <see cref="TopLevelTrackedResource"/> <see cref="ResourceIdentifier"/> from its components.
Expand Down Expand Up @@ -70,5 +146,29 @@ public virtual SingletonTrackedResource GetSingletonTrackedResource(ResourceIden
SingletonTrackedResource.ValidateResourceId(id);
return new SingletonTrackedResource(Client, id);
}

/// <summary>
/// Gets an object representing an <see cref="ExtensionsResource"/> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="ExtensionsResource.CreateResourceIdentifier" /> to create an <see cref="ExtensionsResource"/> <see cref="ResourceIdentifier"/> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="ExtensionsResource"/> object. </returns>
public virtual ExtensionsResource GetExtensionsResource(ResourceIdentifier id)
{
ExtensionsResource.ValidateResourceId(id);
return new ExtensionsResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="LocationResource"/> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="LocationResource.CreateResourceIdentifier" /> to create a <see cref="LocationResource"/> <see cref="ResourceIdentifier"/> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="LocationResource"/> object. </returns>
public virtual LocationResource GetLocationResource(ResourceIdentifier id)
{
LocationResource.ValidateResourceId(id);
return new LocationResource(Client, id);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

#nullable disable

using System;
using System.Threading;
using System.Threading.Tasks;
using Autorest.CSharp.Core;
using Azure;
using Azure.Core;
Expand Down Expand Up @@ -41,6 +43,78 @@ private string GetApiVersionOrNull(ResourceType resourceType)
return apiVersion;
}

/// <summary> Gets a collection of LocationResources in the SubscriptionResource. </summary>
/// <param name="location"> The name of the Azure region. </param>
/// <returns> An object representing collection of LocationResources and their operations over a LocationResource. </returns>
public virtual LocationResourceCollection GetLocationResources(AzureLocation location)
{
return new LocationResourceCollection(Client, Id, location);
}

/// <summary>
/// Get a LocationResource
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/providers/Azure.ResourceManager.Resources/locations/{location}/locationResources/{locationResourceName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>LocationResource_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-12-01-preview</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="LocationResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="location"> The name of the Azure region. </param>
/// <param name="locationResourceName"> The name of the LocationResource. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="locationResourceName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="locationResourceName"/> is an empty string, and was expected to be non-empty. </exception>
[ForwardsClientCalls]
public virtual async Task<Response<LocationResource>> GetLocationResourceAsync(AzureLocation location, string locationResourceName, CancellationToken cancellationToken = default)
{
return await GetLocationResources(location).GetAsync(locationResourceName, cancellationToken).ConfigureAwait(false);
}

/// <summary>
/// Get a LocationResource
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/providers/Azure.ResourceManager.Resources/locations/{location}/locationResources/{locationResourceName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>LocationResource_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-12-01-preview</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="LocationResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="location"> The name of the Azure region. </param>
/// <param name="locationResourceName"> The name of the LocationResource. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="locationResourceName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="locationResourceName"/> is an empty string, and was expected to be non-empty. </exception>
[ForwardsClientCalls]
public virtual Response<LocationResource> GetLocationResource(AzureLocation location, string locationResourceName, CancellationToken cancellationToken = default)
{
return GetLocationResources(location).Get(locationResourceName, cancellationToken);
}

/// <summary>
/// List TopLevelTrackedResource resources by subscription ID
/// <list type="bullet">
Expand Down
Loading

0 comments on commit 440b150

Please sign in to comment.