Skip to content

Commit

Permalink
Fixing R3023 Operation API Implmentation ARM Swagger error (Azure#8423)
Browse files Browse the repository at this point in the history
Co-authored-by: Venkat Akkinepally <veakkine@microsoft.com>
  • Loading branch information
2 people authored and 00Kai0 committed Oct 12, 2020
1 parent 7e56013 commit 6a1499b
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"schemes": [
"https"
],
"produces": [
"application/json"
],
"consumes": [
"application/json"
],
"security": [
{
"azure_auth": [
Expand All @@ -28,6 +34,42 @@
}
},
"paths": {
"/providers/Microsoft.HardwareSecurityModules/operations": {
"get": {
"tags": [
"DedicatedHsmOperations"
],
"operationId": "Operations_List",
"description": "Get a list of Dedicated HSM operations.",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/DedicatedHsmOperationListResult"
}
},
"default": {
"description": "The error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/DedicatedHsmError"
}
}
},
"x-ms-examples": {
"Get a list of Dedicated HSM operations": {
"$ref": "./examples//DedicatedHsm_OperationsList.json"
}
},
"x-ms-pageable": {
"nextLinkName": null
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/{name}": {
"put": {
"tags": [
Expand Down Expand Up @@ -92,13 +134,7 @@
"Create a new or update an existing dedicated HSM": {
"$ref": "./examples//DedicatedHsm_CreateOrUpdate.json"
}
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
]
}
},
"patch": {
"tags": [
Expand Down Expand Up @@ -158,13 +194,7 @@
"Update an existing dedicated HSM": {
"$ref": "./examples//DedicatedHsm_Update.json"
}
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
]
}
},
"delete": {
"tags": [
Expand Down Expand Up @@ -216,13 +246,7 @@
"Delete a dedicated HSM": {
"$ref": "./examples//DedicatedHsm_Delete.json"
}
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
]
}
},
"get": {
"tags": [
Expand Down Expand Up @@ -270,13 +294,7 @@
"Get a dedicated HSM": {
"$ref": "./examples//DedicatedHsm_Get.json"
}
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
]
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs": {
Expand Down Expand Up @@ -329,13 +347,7 @@
"List dedicated HSM devices in a resource group": {
"$ref": "./examples//DedicatedHsm_ListByResourceGroup.json"
}
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
]
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs": {
Expand Down Expand Up @@ -381,17 +393,58 @@
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
]
}
}
}
},
"definitions": {
"DedicatedHsmOperation": {
"description": "REST API operation",
"type": "object",
"properties": {
"name": {
"description": "The name of the Dedicated HSM Resource Provider Operation.",
"type": "string"
},
"isDataAction": {
"description": "Gets or sets a value indicating whether it is a data plane action",
"type": "string",
"readOnly": true
},
"display": {
"properties": {
"provider": {
"description": "The Resource Provider of the operation",
"type": "string"
},
"resource": {
"description": "Resource on which the operation is performed.",
"type": "string"
},
"operation": {
"description": "Operation type: Read, write, delete, etc.",
"type": "string"
},
"description": {
"description": "The object that represents the operation.",
"type": "string"
}
}
}
}
},
"DedicatedHsmOperationListResult": {
"description": "Result of the request to list Dedicated HSM Provider operations. It contains a list of operations.",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/DedicatedHsmOperation"
},
"description": "List of Dedicated HSM Resource Provider operations."
}
}
},
"ApiEntityReference": {
"properties": {
"id": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
},
"networkInterfaces": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic",
"privateIpAddress": "1.0.0.1"
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"api-version": "2018-10-31-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "hsm1",
"isDataAction": "false",
"display": {
"provider": "Microsoft HardwareSecurityModules",
"resource": "Dedicated HSM",
"operation": "DedicatedHsm_Update",
"description": "Update a dedicated HSM in the specified subscription"
}
}
]
}
}
}
}

0 comments on commit 6a1499b

Please sign in to comment.