-
Notifications
You must be signed in to change notification settings - Fork 82
[Spector] Test case for ARM multiple services #3618
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
Merged
tadelesh
merged 15 commits into
Azure:release/december-2025
from
weidongxu-microsoft:specs_arm-multi-service
Dec 19, 2025
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
24f66bb
multi-service for arm
weidongxu-microsoft 2e9f418
Merge remote-tracking branch 'origin/main' into specs_arm-multi-service
129db26
update test
8a9d116
update
e8a69e2
Merge remote-tracking branch 'origin/release/december-2025' into spec…
29ccea9
Merge remote-tracking branch 'origin/release/december-2025' into spec…
235c99f
update spec and doc
8964587
changeset
50a9aca
fix api version
43fe203
Update packages/azure-http-specs/specs/azure/resource-manager/multi-s…
tadelesh fa745c9
Update packages/azure-http-specs/specs/azure/resource-manager/multi-s…
tadelesh 32bcbae
Update packages/azure-http-specs/specs/azure/resource-manager/multi-s…
tadelesh 32f0524
Update packages/azure-http-specs/specs/azure/resource-manager/multi-s…
tadelesh 4ca1dad
update doc
2c7fa07
Merge branch 'release/december-2025' into specs_arm-multi-service
tadelesh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
packages/azure-http-specs/specs/azure/resource-manager/multi-service/client.tsp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import "./service1.tsp"; | ||
| import "./service2.tsp"; | ||
| import "@azure-tools/typespec-client-generator-core"; | ||
|
|
||
| using Versioning; | ||
| using Azure.Core; | ||
| using Azure.ResourceManager; | ||
| using Azure.ClientGenerator.Core; | ||
|
|
||
| @client | ||
| @useDependency(Microsoft.Compute.Versions.v2025_04_01, Microsoft.ComputeDisk.Versions.v2025_01_02) | ||
| namespace Azure.ResourceManager.MultiService { | ||
| @client({ | ||
| service: Microsoft.Compute, | ||
| parent: Azure.ResourceManager.MultiService, | ||
| }) | ||
| interface VitrualMachines extends Microsoft.Compute.VirtualMachines {} | ||
|
|
||
| @client({ | ||
| service: Microsoft.ComputeDisk, | ||
| parent: Azure.ResourceManager.MultiService, | ||
| }) | ||
| interface Disks extends Microsoft.ComputeDisk.Disks {} | ||
| } |
65 changes: 65 additions & 0 deletions
65
packages/azure-http-specs/specs/azure/resource-manager/multi-service/service1.tsp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| import "@typespec/rest"; | ||
| import "@typespec/versioning"; | ||
| import "@azure-tools/typespec-azure-core"; | ||
| import "@azure-tools/typespec-azure-resource-manager"; | ||
|
|
||
| using TypeSpec.Rest; | ||
| using TypeSpec.Http; | ||
| using Azure.Core; | ||
| using Azure.ResourceManager; | ||
| using TypeSpec.Versioning; | ||
|
|
||
| /** | ||
| * Compute Client | ||
| */ | ||
| @armProviderNamespace | ||
| @service(#{ title: "Azure Compute resource management API." }) | ||
| @versioned(Versions) | ||
| namespace Microsoft.Compute; | ||
|
|
||
| /** | ||
| * The available API versions. | ||
| */ | ||
| enum Versions { | ||
| /** | ||
| * The 2024-11-01 API version. | ||
| */ | ||
| @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) | ||
| v2024_11_01: "2024-11-01", | ||
|
|
||
| /** | ||
| * The 2025-04-01 API version. | ||
| */ | ||
| @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) | ||
| v2025_04_01: "2025-04-01", | ||
| } | ||
|
|
||
| /** | ||
| * Describes a Virtual Machine. | ||
| */ | ||
| model VirtualMachine is Azure.ResourceManager.TrackedResource<VirtualMachineProperties> { | ||
| ...ResourceNameParameter< | ||
| Resource = VirtualMachine, | ||
| KeyName = "vmName", | ||
| SegmentName = "virtualMachines", | ||
| NamePattern = "" | ||
| >; | ||
| } | ||
|
|
||
| model VirtualMachineProperties { | ||
| @visibility(Lifecycle.Read) | ||
| provisioningState?: ResourceProvisioningState; | ||
| } | ||
|
|
||
| @armResourceOperations | ||
| interface VirtualMachines { | ||
| /** | ||
| * Retrieves information about the model view or the instance view of a virtual machine. | ||
| */ | ||
| get is ArmResourceRead<VirtualMachine>; | ||
|
|
||
| /** | ||
| * The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. | ||
| */ | ||
| createOrUpdate is ArmResourceCreateOrUpdateAsync<VirtualMachine>; | ||
| } |
68 changes: 68 additions & 0 deletions
68
packages/azure-http-specs/specs/azure/resource-manager/multi-service/service2.tsp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| import "@typespec/rest"; | ||
| import "@typespec/versioning"; | ||
| import "@azure-tools/typespec-azure-core"; | ||
| import "@azure-tools/typespec-azure-resource-manager"; | ||
|
|
||
| using TypeSpec.Rest; | ||
| using TypeSpec.Http; | ||
| using Azure.Core; | ||
| using Azure.ResourceManager; | ||
| using TypeSpec.Versioning; | ||
|
|
||
| /** | ||
| * Compute Client | ||
| */ | ||
| @armProviderNamespace("Microsoft.Compute") | ||
| @service(#{ title: "Azure Compute resource management API." }) | ||
| @versioned(Versions) | ||
| namespace Microsoft.ComputeDisk; | ||
|
|
||
| /** | ||
| * The available API versions. | ||
| */ | ||
| enum Versions { | ||
| /** | ||
| * The 2024-03-02 API version. | ||
| */ | ||
| @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) | ||
| v2024_03_02: "2024-03-02", | ||
|
|
||
| /** | ||
| * The 2025-01-02 API version. | ||
| */ | ||
| @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) | ||
| v2025_01_02: "2025-01-02", | ||
| } | ||
|
|
||
| /** | ||
| * Disk resource. | ||
| */ | ||
| model Disk is Azure.ResourceManager.TrackedResource<DiskProperties> { | ||
| ...ResourceNameParameter< | ||
| Resource = Disk, | ||
| KeyName = "diskName", | ||
| SegmentName = "disks", | ||
| NamePattern = "" | ||
| >; | ||
| } | ||
|
|
||
| /** | ||
| * Disk resource properties. | ||
| */ | ||
| model DiskProperties { | ||
| @visibility(Lifecycle.Read) | ||
| provisioningState?: ResourceProvisioningState; | ||
| } | ||
|
|
||
| @armResourceOperations | ||
| interface Disks { | ||
| /** | ||
| * Gets information about a disk. | ||
| */ | ||
| get is ArmResourceRead<Disk>; | ||
|
|
||
| /** | ||
| * Creates or updates a disk. | ||
| */ | ||
| createOrUpdate is ArmResourceCreateOrUpdateAsync<Disk>; | ||
| } | ||
8 changes: 8 additions & 0 deletions
8
packages/azure-http-specs/specs/azure/resource-manager/multi-service/tspconfig.yaml
|
tadelesh marked this conversation as resolved.
Outdated
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| emit: | ||
| - "@azure-tools/typespec-autorest" | ||
| options: | ||
| "@azure-tools/typespec-autorest": | ||
| omit-unreachable-types: true | ||
| emitter-output-dir: "{project-root}" | ||
| azure-resource-provider-folder: "resource-manager" | ||
| output-file: "{project-root}/openapi.json" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.