Skip to content

Commit

Permalink
Merge pull request #3145 from memontic-ms/swagger-validation-changes
Browse files Browse the repository at this point in the history
[Communication] Fix linter validation errors and blocking GA issues
  • Loading branch information
ravbhatnagar authored Mar 5, 2021
2 parents 164b2a8 + a57d51b commit 3420245
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 178 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"200": {
"description": "Success. The response describes the list of operations.",
"schema": {
"$ref": "#/definitions/OperationList"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/OperationListResult"
}
},
"default": {
Expand Down Expand Up @@ -323,7 +323,7 @@
"description": "Parameters for the update operation",
"required": false,
"schema": {
"$ref": "#/definitions/TaggedResource"
"$ref": "#/definitions/CommunicationServiceResource"
}
},
{
Expand Down Expand Up @@ -645,165 +645,6 @@
}
},
"definitions": {
"OperationList": {
"description": "Result of the request to list REST API operations. It contains a list of operations.",
"type": "object",
"properties": {
"value": {
"description": "List of operations supported by the resource provider.",
"type": "array",
"items": {
"$ref": "#/definitions/Operation"
}
},
"nextLink": {
"description": "The URL the client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.",
"type": "string"
}
}
},
"Operation": {
"description": "REST API operation supported by CommunicationService resource provider.",
"type": "object",
"properties": {
"name": {
"description": "Name of the operation with format: {provider}/{resource}/{operation}",
"type": "string"
},
"display": {
"$ref": "#/definitions/OperationDisplay",
"description": "The object that describes the operation."
},
"origin": {
"description": "Optional. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX.",
"type": "string"
},
"properties": {
"$ref": "#/definitions/OperationProperties",
"description": "Extra properties for the operation.",
"x-ms-client-flatten": false
}
}
},
"OperationDisplay": {
"description": "The object that describes a operation.",
"type": "object",
"properties": {
"provider": {
"description": "Friendly name of the resource provider",
"type": "string"
},
"resource": {
"description": "Resource type on which the operation is performed.",
"type": "string"
},
"operation": {
"description": "The localized friendly name for the operation.",
"type": "string"
},
"description": {
"description": "The localized friendly description for the operation",
"type": "string"
}
}
},
"OperationProperties": {
"description": "Extra Operation properties.",
"type": "object",
"properties": {
"serviceSpecification": {
"$ref": "#/definitions/ServiceSpecification",
"description": "The service specifications."
}
}
},
"ServiceSpecification": {
"description": "An object that describes a specification.",
"type": "object",
"properties": {
"metricSpecifications": {
"description": "Specifications of the Metrics for Azure Monitoring.",
"type": "array",
"items": {
"$ref": "#/definitions/MetricSpecification"
}
}
}
},
"MetricSpecification": {
"description": "Specifications of the Metrics for Azure Monitoring.",
"type": "object",
"properties": {
"name": {
"description": "Name of the metric.",
"type": "string"
},
"displayName": {
"description": "Localized friendly display name of the metric.",
"type": "string"
},
"displayDescription": {
"description": "Localized friendly description of the metric.",
"type": "string"
},
"unit": {
"description": "The unit that makes sense for the metric.",
"type": "string"
},
"aggregationType": {
"description": "The method for aggregating the metric.",
"type": "string",
"enum": [
"Average",
"Minimum",
"Maximum",
"Total",
"Count"
],
"x-ms-enum": {
"name": "AggregationType",
"modelAsString": true
}
},
"fillGapWithZero": {
"description": "Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. \r\nEx. a metric that returns the number of times a particular error code was emitted. The error code may not appear \r\noften, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing was emitted.",
"type": "string"
},
"category": {
"description": "The name of the metric category that the metric belongs to. A metric can only belong to a single category.",
"type": "string"
},
"dimensions": {
"description": "The dimensions of the metrics.",
"type": "array",
"items": {
"$ref": "#/definitions/Dimension"
}
}
}
},
"Dimension": {
"description": "Specifications of the Dimension of metrics.",
"type": "object",
"properties": {
"name": {
"description": "The public facing name of the dimension.",
"type": "string"
},
"displayName": {
"description": "Localized friendly display name of the dimension.",
"type": "string"
},
"internalName": {
"description": "Name of the dimension as it appears in MDM.",
"type": "string"
},
"toBeExportedForShoebox": {
"description": "A Boolean flag indicating whether this dimension should be included for the shoebox export scenario.",
"type": "boolean"
}
}
},
"NameAvailabilityParameters": {
"description": "Data POST-ed to the nameAvailability action",
"required": [
Expand Down Expand Up @@ -956,6 +797,9 @@
"$ref": "#/definitions/CommunicationServiceProperties",
"description": "The properties of the service.",
"x-ms-client-flatten": true
},
"systemData": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"subscriptionId": "12345",
"api-version": "2020-80-20",
"api-version": "2020-08-20",
"nameAvailabilityParameters": {
"type": "Microsoft.Communication/CommunicationServices",
"name": "MyCommunicationService"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"subscriptionId": "12345",
"api-version": "2020-80-20",
"api-version": "2020-08-20",
"nameAvailabilityParameters": {
"type": "Microsoft.Communication/CommunicationServices",
"name": "MyCommunicationService"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-80-20",
"api-version": "2020-08-20",
"parameters": {
"location": "Global",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-80-20"
"api-version": "2020-08-20"
},
"responses": {
"200": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"eventGridFilterName": "MyCommunicationEventFilter",
"api-version": "2020-80-20",
"api-version": "2020-08-20",
"parameters": {
"properties": {
"filter": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"eventGridFilterName": "MyCommunicationEventFilter",
"api-version": "2020-80-20"
"api-version": "2020-08-20"
},
"responses": {
"200": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"eventGridFilterName": "MyCommunicationEventFilter",
"api-version": "2020-80-20"
"api-version": "2020-08-20"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-80-20"
"api-version": "2020-08-20"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"eventGridFilterName": "MyCommunicationEventFilter",
"api-version": "2020-80-20",
"api-version": "2020-08-20",
"parameters": {
"properties": {
"filter": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-80-20"
"api-version": "2020-08-20"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"location": "westus2",
"operationId": "db5f291f-284d-46e9-9152-d5c83f7c14b8",
"api-version": "2020-80-20"
"api-version": "2020-08-20"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-80-20",
"api-version": "2020-08-20",
"linkNotificationHubParameters": {
"resourceId": "/subscriptions/12345/resourceGroups/MyOtherResourceGroup/providers/Microsoft.NotificationHubs/namespaces/MyNamespace/notificationHubs/MyHub",
"connectionString": "Endpoint=sb://MyNamespace.servicebus.windows.net/;SharedAccessKey=abcd1234"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"api-version": "2020-80-20"
"api-version": "2020-08-20"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"subscriptionId": "12345",
"api-version": "2020-80-20"
"api-version": "2020-08-20"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-80-20"
"api-version": "2020-08-20"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-80-20",
"api-version": "2020-08-20",
"parameters": {
"keyType": "Primary"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-80-20",
"api-version": "2020-08-20",
"parameters": {
"tags": {
"newTag": "newVal"
Expand Down

0 comments on commit 3420245

Please sign in to comment.