Skip to content

Commit 025493b

Browse files
authored
Bump MTG version and regen (Azure#50087)
1 parent 5264b64 commit 025493b

File tree

65 files changed

+19298
-15842
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+19298
-15842
lines changed

eng/Packages.Data.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@
439439

440440
<PropertyGroup>
441441
<TestProxyVersion>1.0.0-dev.20250501.1</TestProxyVersion>
442-
<UnbrandedGeneratorVersion>1.0.0-alpha.20250509.1</UnbrandedGeneratorVersion>
442+
<UnbrandedGeneratorVersion>1.0.0-alpha.20250514.1</UnbrandedGeneratorVersion>
443443
<AzureGeneratorVersion>1.0.0-alpha.20250514.1</AzureGeneratorVersion>
444444
</PropertyGroup>
445445
</Project>

eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Azure.Generator.Management.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<PackageReference Include="Azure.Core" />
1010
<PackageReference Include="Azure.Generator" />
1111
<PackageReference Include="Azure.ResourceManager" />
12-
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" />
1312
</ItemGroup>
1413

1514
<Target Name="CheckEmitterBuild" BeforeTargets="Build">

eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Azure.Generator.Mgmt.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<PackageReference Include="NUnit3TestAdapter" />
1010
<PackageReference Include="Moq" />
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" />
12+
<PackageReference Include="Microsoft.TypeSpec.Generator.Input" VersionOverride="1.0.0-alpha.20250509.1"/> <!-- This needs to be removed during the version bump of Management -->
1213
</ItemGroup>
1314

1415
<ItemGroup>

eng/packages/http-client-csharp-mgmt/generator/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Nullable>enable</Nullable>
44
<ImportDefaultReferences>false</ImportDefaultReferences>
55
<IsShippingLibrary>false</IsShippingLibrary>
6-
<NoWarn>$(NoWarn);CS8002</NoWarn>
6+
<NoWarn>$(NoWarn);CS8002;NU1605</NoWarn>
77
</PropertyGroup>
88
<!--
99
Add any shared properties you want for the projects under this package directory that need to be set before the auto imported Directory.Build.props

eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public static Mock<AzureClientGenerator> LoadMockPlugin(
2828
Func<InputApiKeyAuth>? apiKeyAuth = null,
2929
Func<InputOAuth2Auth>? oauth2Auth = null,
3030
Func<IReadOnlyList<string>>? apiVersions = null,
31+
Func<IReadOnlyList<InputLiteralType>>? inputLiterals = null,
3132
Func<IReadOnlyList<InputEnumType>>? inputEnums = null,
3233
Func<IReadOnlyList<InputModelType>>? inputModels = null,
3334
Func<IReadOnlyList<InputClient>>? clients = null,
@@ -37,13 +38,15 @@ public static Mock<AzureClientGenerator> LoadMockPlugin(
3738
string? configurationJson = null)
3839
{
3940
IReadOnlyList<string> inputNsApiVersions = apiVersions?.Invoke() ?? [];
41+
IReadOnlyList<InputLiteralType> inputNsLiterals = inputLiterals?.Invoke() ?? [];
4042
IReadOnlyList<InputEnumType> inputNsEnums = inputEnums?.Invoke() ?? [];
4143
IReadOnlyList<InputClient> inputNsClients = clients?.Invoke() ?? [];
4244
IReadOnlyList<InputModelType> inputNsModels = inputModels?.Invoke() ?? [];
4345
InputAuth inputNsAuth = new InputAuth(apiKeyAuth?.Invoke(), oauth2Auth?.Invoke());
4446
var mockInputNs = new Mock<InputNamespace>(
4547
"Samples",
4648
inputNsApiVersions,
49+
inputNsLiterals,
4750
inputNsEnums,
4851
inputNsModels,
4952
inputNsClients,

eng/packages/http-client-csharp/generator/Azure.Generator/test/common/InputFactory.cs

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,35 @@ public static class EnumMember
4040
/// </summary>
4141
/// <param name="name"></param>
4242
/// <param name="value"></param>
43+
/// <param name="enumType"></param>
4344
/// <returns></returns>
44-
public static InputEnumTypeValue Int32(string name, int value)
45+
public static InputEnumTypeValue Int32(string name, int value, InputEnumType enumType)
4546
{
46-
return new InputEnumTypeValue(name, value, InputPrimitiveType.Int32, null, $"{name} description");
47+
return new InputEnumTypeValue(name, value, InputPrimitiveType.Int32, enumType, "", $"{name} description");
4748
}
4849

4950
/// <summary>
5051
/// Construct input enum type value for float32
5152
/// </summary>
5253
/// <param name="name"></param>
5354
/// <param name="value"></param>
55+
/// <param name="enumType"></param>
5456
/// <returns></returns>
55-
public static InputEnumTypeValue Float32(string name, float value)
57+
public static InputEnumTypeValue Float32(string name, float value, InputEnumType enumType)
5658
{
57-
return new InputEnumTypeValue(name, value, InputPrimitiveType.Float32, null, $"{name} description");
59+
return new InputEnumTypeValue(name, value, InputPrimitiveType.Float32, enumType, "", $"{name} description");
5860
}
5961

6062
/// <summary>
6163
/// Construct input enum type value for string
6264
/// </summary>
6365
/// <param name="name"></param>
6466
/// <param name="value"></param>
67+
/// <param name="enumType"></param>
6568
/// <returns></returns>
66-
public static InputEnumTypeValue String(string name, string value)
69+
public static InputEnumTypeValue String(string name, string value, InputEnumType enumType)
6770
{
68-
return new InputEnumTypeValue(name, value, InputPrimitiveType.String, null, $"{name} description");
71+
return new InputEnumTypeValue(name, value, InputPrimitiveType.String, enumType, "", $"{name} description");
6972
}
7073
}
7174

@@ -78,20 +81,24 @@ public static class Literal
7881
/// Construct input literal type value for string
7982
/// </summary>
8083
/// <param name="value"></param>
84+
/// <param name="name"></param>
85+
/// <param name="namespace"></param>
8186
/// <returns></returns>
82-
public static InputLiteralType String(string value)
87+
public static InputLiteralType String(string value, string? name = null, string? @namespace = null)
8388
{
84-
return new InputLiteralType(InputPrimitiveType.String, value);
89+
return new InputLiteralType(name ?? string.Empty, @namespace ?? string.Empty, InputPrimitiveType.String, value);
8590
}
8691

8792
/// <summary>
8893
/// Construct input enum type value for any
8994
/// </summary>
9095
/// <param name="value"></param>
96+
/// <param name="name"></param>
97+
/// <param name="namespace"></param>
9198
/// <returns></returns>
92-
public static InputLiteralType Any(object value)
99+
public static InputLiteralType Int32(int value, string? name = null, string? @namespace = null)
93100
{
94-
return new InputLiteralType(InputPrimitiveType.Any, value);
101+
return new InputLiteralType(name ?? string.Empty, @namespace ?? string.Empty, InputPrimitiveType.Int32, value);
95102
}
96103
}
97104

eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs

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

eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/GetUnknownValueResponse6.cs

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

eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralFloat.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralInt.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)