Skip to content

Apply SystemObjectTypeProvdier in Azure generator #49098

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

Closed
wants to merge 10 commits into from
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
</ItemGroup>

<ItemGroup Condition="'$(IsGeneratorLibrary)' == 'true'">
<PackageReference Update="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20250423.2" />
<PackageReference Update="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20250425.1" />
<PackageReference Update="Azure.Generator" Version="1.0.0-alpha.20250423.3" />
<PackageReference Update="System.ClientModel" Version="1.3.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal class NamespaceVisitor : ScmLibraryVisitor
{
protected override ModelProvider? PreVisitModel(InputModelType model, ModelProvider? type)
{
if (type is not null)
if (type is not null && type is not SystemObjectTypeProvider)
{
UpdateModelsNamespace(type);
}
Expand Down Expand Up @@ -54,6 +54,11 @@ internal class NamespaceVisitor : ScmLibraryVisitor

private static void UpdateModelsNamespace(TypeProvider type)
{
if (type is SystemObjectTypeProvider)
{
return;
}

if (AzureClientGenerator.Instance.Configuration.UseModelNamespace())
{
type.Type.Update(
Expand Down
Loading