Skip to content

Commit

Permalink
Fix comment #713 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
v-hongli1 committed Aug 29, 2024
1 parent 2542f16 commit 64bfab0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 30 deletions.
2 changes: 1 addition & 1 deletion packages/cadl-ranch-specs/cadl-ranch-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ Expected response body:
}
```

### Azure_ResourceManager_Models_Resources_AvailableOperations_list
### Azure_ResourceManager_Models_Resources_ListAvailableOperations

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,28 @@ union ProvisioningState {
Accepted: "Accepted",
}

@armResourceOperations
interface AvailableOperations {
@scenario
@scenarioDoc("""
Resource GET operation.
Expected path: /providers/Azure.ResourceManager.Models.Resources/operations
Expected query parameter: api-version=2023-12-01-preview
Expected response body:
```json
{
"value": [{
"name": "Microsoft.Compute/virtualMachines/write",
"isDataAction": false,
"display": {
"provider": "Microsoft Compute",
"resource": "Virtual Machines",
"operation": "Create or Update Virtual Machine.",
"description": "Add or modify virtual machines."
},
"origin": "user,system",
"actionType": "Internal"
}]
}
```
""")
list is Operations.list;
}
@scenario("ListAvailableOperations")
@scenarioDoc("""
Resource GET operation.
Expected path: /providers/Azure.ResourceManager.Models.Resources/operations
Expected query parameter: api-version=2023-12-01-preview
Expected response body:
```json
{
"value": [{
"name": "Microsoft.Compute/virtualMachines/write",
"isDataAction": false,
"display": {
"provider": "Microsoft Compute",
"resource": "Virtual Machines",
"operation": "Create or Update Virtual Machine.",
"description": "Add or modify virtual machines."
},
"origin": "user,system",
"actionType": "Internal"
}]
}
```
""")
interface Operations extends Azure.ResourceManager.Operations {}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const validAvailableOperations = {
};

// operation list
Scenarios.Azure_ResourceManager_Models_Resources_AvailableOperations_list = passOnSuccess([
Scenarios.Azure_ResourceManager_Models_Resources_ListAvailableOperations = passOnSuccess([
mockapi.get("/providers/Azure.ResourceManager.Models.Resources/operations", (req) => {
req.expect.containsQueryParam("api-version", "2023-12-01-preview");
return {
Expand Down

0 comments on commit 64bfab0

Please sign in to comment.