-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests for ARM, adds TrackedResource (#588)
* arm test * implement ARM simulator * use mock value * nested * fix tests fix mockapi.ts fix * changelog * changeset * expect value, format * use ProxyResource for child resource * format using node 18 * pnpm-lock.yaml * Revert "pnpm-lock.yaml" This reverts commit 4da25a3. * Revert "format using node 18" This reverts commit a08469f. * change directory * revert package.json * fix scenario doc * cadl-ranch-summary.md * add armCommonTypesVersion * use commonTypeVersion on version parameter * remove from global namespace
- Loading branch information
1 parent
d983279
commit 8b42129
Showing
6 changed files
with
1,081 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,5 @@ | ||
--- | ||
"@azure-tools/cadl-ranch-specs": minor | ||
--- | ||
|
||
Added tests for ARM's tracked resource and nested resource. |
This file contains 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
39 changes: 39 additions & 0 deletions
39
packages/cadl-ranch-specs/http/azure/arm/models/resources/main.tsp
This file contains 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,39 @@ | ||
import "@azure-tools/cadl-ranch-expect"; | ||
import "@typespec/http"; | ||
import "@typespec/rest"; | ||
import "@typespec/versioning"; | ||
import "@azure-tools/typespec-azure-core"; | ||
import "@azure-tools/typespec-azure-resource-manager"; | ||
import "@azure-tools/typespec-client-generator-core"; | ||
import "./toplevel.tsp"; | ||
import "./nested.tsp"; | ||
|
||
using TypeSpec.Http; | ||
using TypeSpec.Rest; | ||
using TypeSpec.Versioning; | ||
using Azure.Core; | ||
using Azure.ResourceManager; | ||
using TypeSpec.OpenAPI; | ||
|
||
@armProviderNamespace | ||
@service | ||
@versioned(Versions) | ||
@doc("Arm Resource Provider management API.") | ||
namespace Azure.Arm.Models.Resources; | ||
|
||
@doc("Azure API versions.") | ||
enum Versions { | ||
@armCommonTypesVersion(CommonTypes.Versions.v5) | ||
@useDependency(Azure.Core.Versions.v1_0_Preview_2) | ||
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) | ||
@doc("Preview API version 2023-12-01-preview.") | ||
v2023_12_01_preview: "2023-12-01-preview", | ||
} | ||
|
||
union ProvisioningState { | ||
ResourceProvisioningState, | ||
Provisioning: "Provisioning", | ||
Updating: "Updating", | ||
Deleting: "Deleting", | ||
Accepted: "Accepted", | ||
} |
Oops, something went wrong.