Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaofeiCao committed Sep 13, 2024
1 parent 98f990b commit c4baeff
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 149 deletions.
116 changes: 58 additions & 58 deletions packages/cadl-ranch-specs/cadl-ranch-summary.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using TypeSpec.OpenAPI;
@service
@versioned(Versions)
@doc("Arm Managed Identity Provider management API.")
namespace Azure.ResourceManager.CommonType.ManagedIdentity;
namespace Azure.ResourceManager.CommonTypes.ManagedIdentity;

@doc("Azure API versions.")
enum Versions {
Expand All @@ -27,7 +27,8 @@ enum Versions {
}

@resource("managedIdentityTrackedResources")
model ManagedIdentityTrackedResource is TrackedResource<ManagedIdentityTrackedResourceProperties> {
model ManagedIdentityTrackedResource
is Azure.ResourceManager.TrackedResource<ManagedIdentityTrackedResourceProperties> {
@key("managedIdentityTrackedResourceName")
@path
@segment("managedIdentityTrackedResources")
Expand All @@ -50,13 +51,13 @@ interface Property {
@scenario
@scenarioDoc("""
Resource GET operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonType.ManagedIdentity/managedIdentityTrackedResources/identity",
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonTypes.ManagedIdentity/managedIdentityTrackedResources/identity",
Expected query parameter: api-version=2023-12-01-preview
Expected response body:
```json
{
"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonType.ManagedIdentity/managedIdentityTrackedResources/identity",
"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonTypes.ManagedIdentity/managedIdentityTrackedResources/identity",
"location": "eastus",
"tags": {
"tagKey1": "tagValue1"
Expand All @@ -77,7 +78,7 @@ interface Property {
@scenario
@scenarioDoc("""
Resource PUT operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonType.ManagedIdentity/managedIdentityTrackedResources/identity",
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonTypes.ManagedIdentity/managedIdentityTrackedResources/identity",
Expected query parameter: api-version=2023-12-01-preview
Expected request body:
```json
Expand All @@ -95,7 +96,7 @@ interface Property {
Expected response body:
```json
{
"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonType.ManagedIdentity/managedIdentityTrackedResources/identity",
"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonTypes.ManagedIdentity/managedIdentityTrackedResources/identity",
"location": "eastus",
"tags": {
"tagKey1": "tagValue1"
Expand All @@ -116,7 +117,7 @@ interface Property {
@scenario
@scenarioDoc("""
Resource PATCH operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonType.ManagedIdentity/managedIdentityTrackedResources/identity",
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonTypes.ManagedIdentity/managedIdentityTrackedResources/identity",
Expected query parameter: api-version=2023-12-01-preview
Expected request body:
```json
Expand All @@ -132,7 +133,7 @@ interface Property {
Expected response body:
```json
{
"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonType.ManagedIdentity/managedIdentityTrackedResources/identity",
"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonTypes.ManagedIdentity/managedIdentityTrackedResources/identity",
"location": "eastus",
"tags": {
"tagKey1": "tagValue1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const RESOURCE_GROUP_EXPECTED = "test-rg";
const IDENTITY_TYPE_SYSTEM_ASSIGNED_EXPECTED = "SystemAssigned";
const IDENTITY_TYPE_SYSTEM_USER_ASSIGNED_EXPECTED = "SystemAssigned,UserAssigned";
const validSystemAssignedManagedIdentityResource = {
id: `/subscriptions/${SUBSCRIPTION_ID_EXPECTED}/resourceGroups/${RESOURCE_GROUP_EXPECTED}/providers/Azure.ResourceManager.CommonType.ManagedIdentity/managedIdentityTrackedResources/identity`,
id: `/subscriptions/${SUBSCRIPTION_ID_EXPECTED}/resourceGroups/${RESOURCE_GROUP_EXPECTED}/providers/Azure.ResourceManager.CommonTypes.ManagedIdentity/managedIdentityTrackedResources/identity`,
location: `${LOCATION_REGION_EXPECTED}`,
tags: {
tagKey1: "tagValue1",
Expand All @@ -28,7 +28,7 @@ const validSystemAssignedManagedIdentityResource = {
};

const validUserAssignedAndSystemAssignedManagedIdentityResource = {
id: `/subscriptions/${SUBSCRIPTION_ID_EXPECTED}/resourceGroups/${RESOURCE_GROUP_EXPECTED}/providers/Azure.ResourceManager.CommonType.ManagedIdentity/managedIdentityTrackedResources/identity`,
id: `/subscriptions/${SUBSCRIPTION_ID_EXPECTED}/resourceGroups/${RESOURCE_GROUP_EXPECTED}/providers/Azure.ResourceManager.CommonTypes.ManagedIdentity/managedIdentityTrackedResources/identity`,
location: `${LOCATION_REGION_EXPECTED}`,
tags: {
tagKey1: "tagValue1",
Expand Down Expand Up @@ -63,9 +63,9 @@ const updateExpectedIdentity = {
};

// managed identity tracked resource
Scenarios.Azure_ResourceManager_CommonType_ManagedIdentity_Property_get = passOnSuccess([
Scenarios.Azure_ResourceManager_CommonTypes_ManagedIdentity_Property_get = passOnSuccess([
mockapi.get(
"/subscriptions/:subscriptionId/resourceGroups/:resourceGroup/providers/Azure.ResourceManager.CommonType.ManagedIdentity/managedIdentityTrackedResources/:managedIdentityResourceName",
"/subscriptions/:subscriptionId/resourceGroups/:resourceGroup/providers/Azure.ResourceManager.CommonTypes.ManagedIdentity/managedIdentityTrackedResources/:managedIdentityResourceName",
(req) => {
req.expect.containsQueryParam("api-version", "2023-12-01-preview");
if (req.params.subscriptionId !== SUBSCRIPTION_ID_EXPECTED) {
Expand All @@ -89,9 +89,9 @@ Scenarios.Azure_ResourceManager_CommonType_ManagedIdentity_Property_get = passOn
),
]);

Scenarios.Azure_ResourceManager_CommonType_ManagedIdentity_Property_createWithSystemAssigned = passOnSuccess([
Scenarios.Azure_ResourceManager_CommonTypes_ManagedIdentity_Property_createWithSystemAssigned = passOnSuccess([
mockapi.put(
"/subscriptions/:subscriptionId/resourceGroups/:resourceGroup/providers/Azure.ResourceManager.CommonType.ManagedIdentity/managedIdentityTrackedResources/:managedIdentityResourceName",
"/subscriptions/:subscriptionId/resourceGroups/:resourceGroup/providers/Azure.ResourceManager.CommonTypes.ManagedIdentity/managedIdentityTrackedResources/:managedIdentityResourceName",
(req) => {
req.expect.containsQueryParam("api-version", "2023-12-01-preview");
if (req.params.subscriptionId !== SUBSCRIPTION_ID_EXPECTED) {
Expand All @@ -116,10 +116,10 @@ Scenarios.Azure_ResourceManager_CommonType_ManagedIdentity_Property_createWithSy
),
]);

Scenarios.Azure_ResourceManager_CommonType_ManagedIdentity_Property_updateWithUserAssignedAndSystemAssigned =
Scenarios.Azure_ResourceManager_CommonTypes_ManagedIdentity_Property_updateWithUserAssignedAndSystemAssigned =
passOnSuccess([
mockapi.patch(
"/subscriptions/:subscriptionId/resourceGroups/:resourceGroup/providers/Azure.ResourceManager.CommonType.ManagedIdentity/managedIdentityTrackedResources/:managedIdentityResourceName",
"/subscriptions/:subscriptionId/resourceGroups/:resourceGroup/providers/Azure.ResourceManager.CommonTypes.ManagedIdentity/managedIdentityTrackedResources/:managedIdentityResourceName",
(req) => {
req.expect.containsQueryParam("api-version", "2023-12-01-preview");
if (req.params.subscriptionId !== SUBSCRIPTION_ID_EXPECTED) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ using TypeSpec.OpenAPI;
@service
@versioned(Versions)
@doc("Arm Resource Provider management API.")
namespace Azure.ResourceManager.Resource;
namespace Azure.ResourceManager.Resources;

@doc("Azure API versions.")
enum Versions {
Expand Down
Loading

0 comments on commit c4baeff

Please sign in to comment.