Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ARMViolations for Microsoft.Resources #3912

Merged
merged 3 commits into from
Sep 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,31 @@
}
},
"paths": {
"/providers/Microsoft.Resources/operations": {
"get": {
"tags": [
"Operations"
],
"operationId": "Operations_List",
"description": "Lists all of the available Microsoft.Resources REST API operations.",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/OperationListResult"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/locations": {
"get": {
"tags": [
Expand Down Expand Up @@ -312,6 +337,53 @@
"nextLink"
],
"description": "Tenant Ids information."
},
"Operation": {
"description": "Microsoft.Resources operation",
"type": "object",
"properties": {
"name": {
"description": "Operation name: {provider}/{resource}/{operation}",
"type": "string"
},
"display": {
"description": "The object that represents the operation.",
"properties": {
"provider": {
"description": "Service provider: Microsoft.Resources",
"type": "string"
},
"resource": {
"description": "Resource on which the operation is performed: Profile, endpoint, etc.",
"type": "string"
},
"operation": {
"description": "Operation type: Read, write, delete, etc.",
"type": "string"
},
"description": {
"description": "Description of the operation.",
"type": "string"
}
}
}
}
},
"OperationListResult": {
"description": "Result of the request to list Microsoft.Resources operations. It contains a list of operations and a URL link to get the next set of results.",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/Operation"
},
"description": "List of Microsoft.Resources operations."
},
"nextLink": {
"type": "string",
"description": "URL to get the next set of operation list results if there are any."
}
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,31 @@
}
},
"paths": {
"/providers/Microsoft.Resources/operations": {
"get": {
"tags": [
"Operations"
],
"operationId": "Operations_List",
"description": "Lists all of the available Microsoft.Resources REST API operations.",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/OperationListResult"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/{linkId}": {
"delete": {
"tags": [
Expand Down Expand Up @@ -263,6 +288,11 @@
"type": "string",
"description": "The name of the resource link."
},
"type": {
"readOnly": true,
"type": "object",
"description": "The resource link object."
},
"properties": {
"$ref": "#/definitions/ResourceLinkProperties",
"description": "Properties for resource link."
Expand Down Expand Up @@ -291,6 +321,53 @@
"targetId"
],
"description": "The resource link properties."
},
"Operation": {
"description": "Microsoft.Resources operation",
"type": "object",
"properties": {
"name": {
"description": "Operation name: {provider}/{resource}/{operation}",
"type": "string"
},
"display": {
"description": "The object that represents the operation.",
"properties": {
"provider": {
"description": "Service provider: Microsoft.Resources",
"type": "string"
},
"resource": {
"description": "Resource on which the operation is performed: Profile, endpoint, etc.",
"type": "string"
},
"operation": {
"description": "Operation type: Read, write, delete, etc.",
"type": "string"
},
"description": {
"description": "Description of the operation.",
"type": "string"
}
}
}
}
},
"OperationListResult": {
"description": "Result of the request to list Microsoft.Resources operations. It contains a list of operations and a URL link to get the next set of results.",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/Operation"
},
"description": "List of Microsoft.Resources operations."
},
"nextLink": {
"type": "string",
"description": "URL to get the next set of operation list results if there are any."
}
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,31 @@
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this file, when we use autorest to check ARM violations, we always have ARMViolations for "TagDetails". The error is that we must have name and type properties for it, and "TagDetails" has extra properties ['tagName', 'count', 'values']. I checked resources.json for 2018-02-01, the definition for "TagDetails" is the same, but there is no such errors in autorest. Do you know how I can address it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @zjpjack
Please add a suppression rule for the TagDetails object in the Readme. You can tag example on the compute file, this should look like this:

directive:
  - where:
      - $.definitions.TagDetails
    suppress:
      - NameOfYourErrorInCamelCase

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will let @ravbhatnagar knows this suppression, he or I will send another PR for these suppression rules.

},
"paths": {
"/providers/Microsoft.Resources/operations": {
"get": {
"tags": [
"Operations"
],
"operationId": "Operations_List",
"description": "Lists all of the available Microsoft.Resources REST API operations.",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/OperationListResult"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}": {
"delete": {
"tags": [
Expand Down Expand Up @@ -2785,6 +2810,7 @@
"description": "The ID of the deployment."
},
"name": {
"readOnly": true,
"type": "string",
"description": "The name of the deployment."
},
Expand All @@ -2797,9 +2823,6 @@
"description": "Deployment properties."
}
},
"required": [
"name"
],
"x-ms-azure-resource": true,
"description": "Deployment information."
},
Expand Down Expand Up @@ -3000,6 +3023,7 @@
"description": "The ID of the resource group."
},
"name": {
"readOnly": true,
"type": "string",
"description": "The name of the resource group."
},
Expand Down Expand Up @@ -3310,7 +3334,7 @@
},
"operation": {
"type": "string",
"description": "Operation."
"description": "Resource provider operation."
},
"description": {
"type": "string",
Expand Down Expand Up @@ -3349,7 +3373,7 @@
}
},
"x-ms-azure-resource": true,
"description": "Resource."
"description": "Specified resource."
},
"SubResource": {
"properties": {
Expand All @@ -3373,6 +3397,53 @@
}
},
"description": "Resource group export result."
},
"Operation": {
"description": "Microsoft.Resources operation",
"type": "object",
"properties": {
"name": {
"description": "Operation name: {provider}/{resource}/{operation}",
"type": "string"
},
"display": {
"description": "The object that represents the operation.",
"properties": {
"provider": {
"description": "Service provider: Microsoft.Resources",
"type": "string"
},
"resource": {
"description": "Resource on which the operation is performed: Profile, endpoint, etc.",
"type": "string"
},
"operation": {
"description": "Operation type: Read, write, delete, etc.",
"type": "string"
},
"description": {
"description": "Description of the operation.",
"type": "string"
}
}
}
}
},
"OperationListResult": {
"description": "Result of the request to list Microsoft.Resources operations. It contains a list of operations and a URL link to get the next set of results.",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/Operation"
},
"description": "List of Microsoft.Resources operations."
},
"nextLink": {
"type": "string",
"description": "URL to get the next set of operation list results if there are any."
}
}
}
},
"parameters": {
Expand Down