Skip to content

Commit cadc4b2

Browse files
pshao25Pan Shao
andauthored
Upgrade TypeSpec version (#5397)
* Upgrade TypeSpec version * update --------- Co-authored-by: Pan Shao <[email protected]>
1 parent 18e877c commit cadc4b2

File tree

18 files changed

+1379
-1840
lines changed

18 files changed

+1379
-1840
lines changed

package-lock.json

Lines changed: 983 additions & 1270 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
"url": "https://github.com/Azure/autorest.csharp/issues"
1313
},
1414
"devDependencies": {
15-
"@typespec/http-specs": "0.1.0-alpha.25",
16-
"@typespec/spector": "0.1.0-alpha.17",
17-
"@azure-tools/azure-http-specs": "0.1.0-alpha.25",
18-
"@azure-tools/typespec-azure-resource-manager": "0.59.2",
19-
"@azure-tools/typespec-client-generator-core": "0.59.1",
15+
"@typespec/http-specs": "0.1.0-alpha.26",
16+
"@typespec/spector": "0.1.0-alpha.18",
17+
"@azure-tools/azure-http-specs": "0.1.0-alpha.28",
18+
"@azure-tools/typespec-azure-resource-manager": "0.60.0",
19+
"@azure-tools/typespec-client-generator-core": "0.60.0",
2020
"@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp",
2121
"@azure-tools/unbranded-tests": "file:test/UnbrandedProjects",
2222
"@microsoft.azure/autorest.testserver": "3.3.50",

src/TypeSpec.Extension/Emitter.Csharp/package.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -37,43 +37,43 @@
3737
"@autorest/csharp": "3.0.0-beta.20240625.4"
3838
},
3939
"peerDependencies": {
40-
"@azure-tools/typespec-azure-core": ">=0.59.0 <0.60.0 || ~0.60.0-0",
41-
"@azure-tools/typespec-client-generator-core": ">=0.59.0 <0.60.0 || ~0.60.0-0",
42-
"@azure-tools/typespec-azure-resource-manager": ">=0.59.0 <0.60.0 || ~0.60.0-0",
43-
"@azure-tools/typespec-azure-rulesets": ">=0.59.0 <0.60.0 || ~0.60.0-0",
44-
"@azure-tools/typespec-autorest": ">=0.59.0 <0.60.0 || ~0.60.0-0",
40+
"@azure-tools/typespec-azure-core": ">=0.60.0 <0.61.0 || ~0.61.0-0",
41+
"@azure-tools/typespec-client-generator-core": ">=0.60.0 <0.61.0 || ~0.61.0-0",
42+
"@azure-tools/typespec-azure-resource-manager": ">=0.60.0 <0.61.0 || ~0.61.0-0",
43+
"@azure-tools/typespec-azure-rulesets": ">=0.60.0 <0.61.0 || ~0.61.0-0",
44+
"@azure-tools/typespec-autorest": ">=0.60.0 <0.61.0 || ~0.61.0-0",
4545
"@azure-tools/typespec-liftr-base": ">=0.6.0 <1.0.0",
46-
"@typespec/compiler": "^1.3.0",
47-
"@typespec/events": ">=0.73.0 <1.0.0",
48-
"@typespec/http": "^1.3.0",
49-
"@typespec/openapi": "^1.3.0",
50-
"@typespec/rest": ">=0.73.0 <1.0.0",
51-
"@typespec/sse": ">=0.73.0 <1.0.0",
52-
"@typespec/streams": ">=0.73.0 <1.0.0",
53-
"@typespec/versioning": ">=0.73.0 <1.0.0",
54-
"@typespec/xml": ">=0.73.0 <1.0.0"
46+
"@typespec/compiler": "^1.4.0",
47+
"@typespec/events": ">=0.74.0 <1.0.0",
48+
"@typespec/http": "^1.4.0",
49+
"@typespec/openapi": "^1.4.0",
50+
"@typespec/rest": ">=0.74.0 <1.0.0",
51+
"@typespec/sse": ">=0.74.0 <1.0.0",
52+
"@typespec/streams": ">=0.74.0 <1.0.0",
53+
"@typespec/versioning": ">=0.74.0 <1.0.0",
54+
"@typespec/xml": ">=0.74.0 <1.0.0"
5555
},
5656
"devDependencies": {
57-
"@azure-tools/typespec-azure-core": "0.59.0",
58-
"@azure-tools/typespec-client-generator-core": "0.59.1",
59-
"@azure-tools/typespec-azure-resource-manager": "0.59.2",
60-
"@azure-tools/typespec-azure-rulesets": "0.59.0",
61-
"@azure-tools/typespec-autorest": "0.59.0",
57+
"@azure-tools/typespec-azure-core": "0.60.0",
58+
"@azure-tools/typespec-client-generator-core": "0.60.0",
59+
"@azure-tools/typespec-azure-resource-manager": "0.60.0",
60+
"@azure-tools/typespec-azure-rulesets": "0.60.0",
61+
"@azure-tools/typespec-autorest": "0.60.0",
6262
"@azure-tools/typespec-liftr-base": "0.8.0",
6363
"@eslint/js": "^9.15.0",
6464
"@types/mocha": "~10.0.9",
6565
"@types/node": "~22.7.9",
6666
"@types/prettier": "^2.6.3",
67-
"@typespec/compiler": "1.3.0",
68-
"@typespec/events": "0.73.0",
69-
"@typespec/http": "1.3.0",
70-
"@typespec/library-linter": "0.73.0",
71-
"@typespec/openapi": "1.3.0",
72-
"@typespec/rest": "0.73.0",
73-
"@typespec/sse": "0.73.0",
74-
"@typespec/streams": "0.73.0",
75-
"@typespec/versioning": "0.73.0",
76-
"@typespec/xml": "0.73.0",
67+
"@typespec/compiler": "1.4.0",
68+
"@typespec/events": "0.74.0",
69+
"@typespec/http": "1.4.0",
70+
"@typespec/library-linter": "0.74.0",
71+
"@typespec/openapi": "1.4.0",
72+
"@typespec/rest": "0.74.0",
73+
"@typespec/sse": "0.74.0",
74+
"@typespec/streams": "0.74.0",
75+
"@typespec/versioning": "0.74.0",
76+
"@typespec/xml": "0.74.0",
7777
"eslint": "^9.15.0",
7878
"globals": "^15.2.0",
7979
"prettier": "^3.3.3",

test/CadlRanchProjects.Tests/client-naming.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ public Task Client_Naming_Header_response() => Test(async (host) =>
7878
[Test]
7979
public Task Client_Naming_Model_client() => Test(async (host) =>
8080
{
81-
var response = await new NamingClient(host, null).GetClientModelClient().ClientAsync(new Client.Naming.Models.ClientModel(true));
81+
var response = await new NamingClient(host, null).GetModelClient().ClientAsync(new Client.Naming.Models.ClientModel(true));
8282
Assert.AreEqual(204, response.Status);
8383
});
8484

8585
[Test]
8686
public Task Client_Naming_Model_language() => Test(async (host) =>
8787
{
88-
var response = await new NamingClient(host, null).GetClientModelClient().LanguageAsync(new CSModel(true));
88+
var response = await new NamingClient(host, null).GetModelClient().LanguageAsync(new CSModel(true));
8989
Assert.AreEqual(204, response.Status);
9090
});
9191

test/CadlRanchProjects/client/naming/src/Generated/Docs/ClientModel.xml renamed to test/CadlRanchProjects/client/naming/src/Generated/Docs/Model.xml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,41 @@
55
<example>
66
This sample shows how to call ClientAsync.
77
<code><![CDATA[
8-
ClientModel client = new NamingClient().GetClientModelClient();
8+
Model client = new NamingClient().GetModelClient();
99
10-
Models.ClientModel body = new Models.ClientModel(true);
10+
ClientModel body = new ClientModel(true);
1111
Response response = await client.ClientAsync(body);
1212
]]></code>
1313
This sample shows how to call ClientAsync with all parameters.
1414
<code><![CDATA[
15-
ClientModel client = new NamingClient().GetClientModelClient();
15+
Model client = new NamingClient().GetModelClient();
1616
17-
Models.ClientModel body = new Models.ClientModel(true);
17+
ClientModel body = new ClientModel(true);
1818
Response response = await client.ClientAsync(body);
1919
]]></code></example>
2020
</member>
2121
<member name="Client(ClientModel,CancellationToken)">
2222
<example>
2323
This sample shows how to call Client.
2424
<code><![CDATA[
25-
ClientModel client = new NamingClient().GetClientModelClient();
25+
Model client = new NamingClient().GetModelClient();
2626
27-
Models.ClientModel body = new Models.ClientModel(true);
27+
ClientModel body = new ClientModel(true);
2828
Response response = client.Client(body);
2929
]]></code>
3030
This sample shows how to call Client with all parameters.
3131
<code><![CDATA[
32-
ClientModel client = new NamingClient().GetClientModelClient();
32+
Model client = new NamingClient().GetModelClient();
3333
34-
Models.ClientModel body = new Models.ClientModel(true);
34+
ClientModel body = new ClientModel(true);
3535
Response response = client.Client(body);
3636
]]></code></example>
3737
</member>
3838
<member name="ClientAsync(RequestContent,RequestContext)">
3939
<example>
4040
This sample shows how to call ClientAsync.
4141
<code><![CDATA[
42-
ClientModel client = new NamingClient().GetClientModelClient();
42+
Model client = new NamingClient().GetModelClient();
4343
4444
using RequestContent content = RequestContent.Create(new
4545
{
@@ -51,7 +51,7 @@ Console.WriteLine(response.Status);
5151
]]></code>
5252
This sample shows how to call ClientAsync with all request content.
5353
<code><![CDATA[
54-
ClientModel client = new NamingClient().GetClientModelClient();
54+
Model client = new NamingClient().GetModelClient();
5555
5656
using RequestContent content = RequestContent.Create(new
5757
{
@@ -66,7 +66,7 @@ Console.WriteLine(response.Status);
6666
<example>
6767
This sample shows how to call Client.
6868
<code><![CDATA[
69-
ClientModel client = new NamingClient().GetClientModelClient();
69+
Model client = new NamingClient().GetModelClient();
7070
7171
using RequestContent content = RequestContent.Create(new
7272
{
@@ -78,7 +78,7 @@ Console.WriteLine(response.Status);
7878
]]></code>
7979
This sample shows how to call Client with all request content.
8080
<code><![CDATA[
81-
ClientModel client = new NamingClient().GetClientModelClient();
81+
Model client = new NamingClient().GetModelClient();
8282
8383
using RequestContent content = RequestContent.Create(new
8484
{
@@ -93,14 +93,14 @@ Console.WriteLine(response.Status);
9393
<example>
9494
This sample shows how to call LanguageAsync.
9595
<code><![CDATA[
96-
ClientModel client = new NamingClient().GetClientModelClient();
96+
Model client = new NamingClient().GetModelClient();
9797
9898
CSModel body = new CSModel(true);
9999
Response response = await client.LanguageAsync(body);
100100
]]></code>
101101
This sample shows how to call LanguageAsync with all parameters.
102102
<code><![CDATA[
103-
ClientModel client = new NamingClient().GetClientModelClient();
103+
Model client = new NamingClient().GetModelClient();
104104
105105
CSModel body = new CSModel(true);
106106
Response response = await client.LanguageAsync(body);
@@ -110,14 +110,14 @@ Response response = await client.LanguageAsync(body);
110110
<example>
111111
This sample shows how to call Language.
112112
<code><![CDATA[
113-
ClientModel client = new NamingClient().GetClientModelClient();
113+
Model client = new NamingClient().GetModelClient();
114114
115115
CSModel body = new CSModel(true);
116116
Response response = client.Language(body);
117117
]]></code>
118118
This sample shows how to call Language with all parameters.
119119
<code><![CDATA[
120-
ClientModel client = new NamingClient().GetClientModelClient();
120+
Model client = new NamingClient().GetModelClient();
121121
122122
CSModel body = new CSModel(true);
123123
Response response = client.Language(body);
@@ -127,7 +127,7 @@ Response response = client.Language(body);
127127
<example>
128128
This sample shows how to call LanguageAsync.
129129
<code><![CDATA[
130-
ClientModel client = new NamingClient().GetClientModelClient();
130+
Model client = new NamingClient().GetModelClient();
131131
132132
using RequestContent content = RequestContent.Create(new
133133
{
@@ -139,7 +139,7 @@ Console.WriteLine(response.Status);
139139
]]></code>
140140
This sample shows how to call LanguageAsync with all request content.
141141
<code><![CDATA[
142-
ClientModel client = new NamingClient().GetClientModelClient();
142+
Model client = new NamingClient().GetModelClient();
143143
144144
using RequestContent content = RequestContent.Create(new
145145
{
@@ -154,7 +154,7 @@ Console.WriteLine(response.Status);
154154
<example>
155155
This sample shows how to call Language.
156156
<code><![CDATA[
157-
ClientModel client = new NamingClient().GetClientModelClient();
157+
Model client = new NamingClient().GetModelClient();
158158
159159
using RequestContent content = RequestContent.Create(new
160160
{
@@ -166,7 +166,7 @@ Console.WriteLine(response.Status);
166166
]]></code>
167167
This sample shows how to call Language with all request content.
168168
<code><![CDATA[
169-
ClientModel client = new NamingClient().GetClientModelClient();
169+
Model client = new NamingClient().GetModelClient();
170170
171171
using RequestContent content = RequestContent.Create(new
172172
{

0 commit comments

Comments
 (0)