Skip to content

Conversation

@timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Nov 25, 2025

fix #3555

@timotheeguerin timotheeguerin added the int:azure-specs Run integration tests against azure-rest-api-specs label Nov 25, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library label Nov 25, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 25, 2025

Open in StackBlitz

npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/typespec-azure-resource-manager@3572

commit: fe72678

@azure-sdk
Copy link
Collaborator

azure-sdk commented Nov 25, 2025

All changed packages have been documented.

  • @azure-tools/typespec-azure-resource-manager
Show changes

@azure-tools/typespec-azure-resource-manager - feature ✏️

Remove single service restriction for ARM specs

@azure-sdk
Copy link
Collaborator

azure-sdk commented Nov 25, 2025

You can try these changes here

🛝 Playground 🌐 Website

Comment on lines +1211 to +1224
@armProviderNamespace
namespace Microsoft.ServiceA {
model ResA is TrackedResource<{}> {
@key @segment("foos") @path name: string;
}
}
@armProviderNamespace
namespace Microsoft.ServiceB {
model ResB is TrackedResource<{}> {
@key @segment("foos") @path name: string;
}
}
`);
Copy link
Member

@ArcturusZhang ArcturusZhang Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so how would it behave if we have two parts with the same provider namespace but with different api version enum? this case happen in compute.
Do we have to do something like this?

@providerNamespace("Microsoft.Compute")
@versioned(VMVersions)
namespace Microsoft.Compute.Vms {}

@providerNamespace("Microsoft.Compute")
@versioned(DiskVersions)
namespace Microsoft.Compute.Disks {}

and if we have to do it in the above way, we might not be able to just put them into the one client.tsp without changing their specs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that would be how to do it I asssume playground

}
`);

const resources = getArmResources(program);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a plan that we deprecate this API.
Should we use resolveArmResources instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hhm maybe but this is what all the tests in this file are using and I don't think it will fully go away(at least internally) as this is just the low level accessor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

int:azure-specs Run integration tests against azure-rest-api-specs lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants