Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
v-hongli1 committed Aug 30, 2024
1 parent 15ad388 commit 8ca02c5
Show file tree
Hide file tree
Showing 3 changed files with 324 additions and 100 deletions.
38 changes: 19 additions & 19 deletions packages/cadl-ranch-specs/cadl-ranch-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -907,12 +907,12 @@ Expected response body:
}
```

### Azure_ResourceManager_Models_Resources_ExtensionsResources_createOrUpdate
### Azure_ResourceManager_Models_Resources_Extensions_createOrUpdate

- Endpoint: `put https://management.azure.com`

Resource PUT operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected path: /<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected query parameter: api-version=2023-12-01-preview

Expected request body:
Expand All @@ -928,9 +928,9 @@ Expected response body:

```json
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"id": "/<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"name": "extension",
"type": "extension",
"type": "Azure.ResourceManager.Models.Resources/extensionsResources",
"properties":{
"description": "valid",
"provisioningState": "Succeeded"
Expand All @@ -946,31 +946,31 @@ Expected response body:
}
```

### Azure_ResourceManager_Models_Resources_ExtensionsResources_delete
### Azure_ResourceManager_Models_Resources_Extensions_delete

- Endpoint: `delete https://management.azure.com`

Resource DELETE operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected path: /<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected query parameter: api-version=2023-12-01-preview

````
Expected response status code: 204

### Azure_ResourceManager_Models_Resources_ExtensionsResources_get
### Azure_ResourceManager_Models_Resources_Extensions_get

- Endpoint: `get https://management.azure.com`

Resource GET operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected path: /<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
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.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"id": "/<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"name": "extension",
"type": "extension",
"type": "Azure.ResourceManager.Models.Resources/extensionsResources",
"properties":{
"description": "valid",
"provisioningState": "Succeeded"
Expand All @@ -986,22 +986,22 @@ Expected response body:
}
````

### Azure_ResourceManager_Models_Resources_ExtensionsResources_listByResourceGroup
### Azure_ResourceManager_Models_Resources_Extensions_listByParent

- Endpoint: `get https://management.azure.com`

Resource LIST by resource group operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionResources
Resource LIST by parent url operation.
Expected path: /<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionResources
Expected query parameter: api-version=2023-12-01-preview

Expected response body:

```json
{
"value": [{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"id": "/<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"name": "extension",
"type": "extension",
"type": "Azure.ResourceManager.Models.Resources/extensionsResources",
"properties":{
"description": "valid",
"provisioningState": "Succeeded"
Expand All @@ -1018,12 +1018,12 @@ Expected response body:
}
```

### Azure_ResourceManager_Models_Resources_ExtensionsResources_update
### Azure_ResourceManager_Models_Resources_Extensions_update

- Endpoint: `patch https://management.azure.com`

Resource Patch operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected path: /<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected query parameter: api-version=2023-12-01-preview

Expected request body:
Expand All @@ -1039,9 +1039,9 @@ Expected response body:

```json
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"id": "/<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"name": "extension",
"type": "extension",
"type": "Azure.ResourceManager.Models.Resources/extensionsResources",
"properties":{
"description": "valid2",
"provisioningState": "Succeeded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import "@typespec/http";
import "@typespec/rest";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@azure-tools/typespec-client-generator-core";

using TypeSpec.Http;
using TypeSpec.Rest;
using Azure.Core;
using Azure.ResourceManager;
using TypeSpec.OpenAPI;
using Azure.ClientGenerator.Core;

namespace Azure.ResourceManager.Models.Resources;

Expand All @@ -26,19 +28,20 @@ model ExtensionsResourceProperties {
}

@armResourceOperations
interface ExtensionsResources {
@clientName("ExtensionsResources")
interface Extensions {
@scenario
@scenarioDoc("""
Resource GET operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected path: /<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
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.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"id": "/<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"name": "extension",
"type": "extension",
"type": "Azure.ResourceManager.Models.Resources/extensionsResources",
"properties":{
"description": "valid",
"provisioningState": "Succeeded"
Expand All @@ -59,7 +62,7 @@ interface ExtensionsResources {
@scenario
@scenarioDoc("""
Resource PUT operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected path: /<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected query parameter: api-version=2023-12-01-preview

Expected request body:
Expand All @@ -73,9 +76,9 @@ interface ExtensionsResources {
Expected response body:
```json
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"id": "/<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"name": "extension",
"type": "extension",
"type": "Azure.ResourceManager.Models.Resources/extensionsResources",
"properties":{
"description": "valid",
"provisioningState": "Succeeded"
Expand All @@ -96,7 +99,7 @@ interface ExtensionsResources {
@scenario
@scenarioDoc("""
Resource Patch operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected path: /<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected query parameter: api-version=2023-12-01-preview

Expected request body:
Expand All @@ -110,9 +113,9 @@ interface ExtensionsResources {
Expected response body:
```json
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"id": "/<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"name": "extension",
"type": "extension",
"type": "Azure.ResourceManager.Models.Resources/extensionsResources",
"properties":{
"description": "valid2",
"provisioningState": "Succeeded"
Expand All @@ -133,7 +136,7 @@ interface ExtensionsResources {
@scenario
@scenarioDoc("""
Resource DELETE operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected path: /<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension
Expected query parameter: api-version=2023-12-01-preview
```
Expected response status code: 204
Expand All @@ -142,17 +145,17 @@ interface ExtensionsResources {

@scenario
@scenarioDoc("""
Resource LIST by resource group operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionResources
Resource LIST by parent url operation.
Expected path: /<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionResources
Expected query parameter: api-version=2023-12-01-preview

Expected response body:
```json
{
"value": [{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.Resources/topLevelTrackedResources/top/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"id": "/<resourceUri>/providers/Azure.ResourceManager.Models.Resources/extensionsResources/extension",
"name": "extension",
"type": "extension",
"type": "Azure.ResourceManager.Models.Resources/extensionsResources",
"properties":{
"description": "valid",
"provisioningState": "Succeeded"
Expand All @@ -169,5 +172,5 @@ interface ExtensionsResources {
}
```
""")
listByResourceGroup is ArmResourceListByParent<ExtensionsResource>;
listByParent is ArmResourceListByParent<ExtensionsResource>;
}
Loading

0 comments on commit 8ca02c5

Please sign in to comment.