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

Adds identity type to patch monitor request. #19206

Merged
merged 3 commits into from
Jun 6, 2022
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
@@ -0,0 +1,41 @@
{
"swagger": "2.0",
"info": {
"version": "2021-12-01-preview",
"title": "Workloads Client",
"description": "Workloads client provides access to various workload operations"
},
"paths": {},
"definitions": {
"ManagedServiceIdentityType": {
"description": "Type of managed service identity (only None, UserAssigned types are allowed).",
"enum": [
"None",
"UserAssigned"
],
"type": "string",
"x-ms-enum": {
"name": "ManagedServiceIdentityType",
"modelAsString": true
}
},
"UserAssignedServiceIdentity": {
"description": "Managed service identity (user assigned identities)",
"type": "object",
"properties": {
"type": {
"description": "Type of manage identity",
"$ref": "#/definitions/ManagedServiceIdentityType"
},
"userAssignedIdentities": {
"description": "User assigned identities dictionary",
"$ref": "../../../../../common-types/resource-management/v3/managedidentity.json#/definitions/UserAssignedIdentities"
}
},
"required": [
"type"
]
}
},
"parameters": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "myResourceGroup",
"monitorName": "mySapMonitor",
"tagsParameter": {
"body": {
"tags": {
"testkey": "testvalue"
},
"identity": {
"type": "None"
}
}
},
Expand All @@ -28,6 +31,9 @@
"lastModifiedByType": "User",
"lastModifiedAt": "2021-08-19T15:10:46.196Z"
},
"identity": {
"type": "None"
},
"properties": {
"provisioningState": "Succeeded",
"errors": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "myResourceGroup",
"monitorName": "mySapMonitor",
"tagsParameter": {
"tags": {}
"body": {
"tags": {},
"identity": {
"type": "None"
}
}
},
"responses": {
Expand All @@ -26,6 +29,9 @@
"lastModifiedByType": "User",
"lastModifiedAt": "2021-08-19T15:10:46.196Z"
},
"identity": {
"type": "None"
},
"properties": {
"provisioningState": "Succeeded",
"errors": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,13 @@
"$ref": "#/parameters/monitorNameParameter"
},
{
"$ref": "#/parameters/TagsParameter"
Copy link
Member

Choose a reason for hiding this comment

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

The previous swagger is really a bad design, every time you do the change like in this PR, it will be a breaking change for SDKs.

"in": "body",
"name": "body",
"required": true,
"description": "The Update SAP workload monitor request body.",
"schema": {
"$ref": "#/definitions/UpdateMonitorRequest"
}
Copy link
Member

Choose a reason for hiding this comment

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

Please make this parameter required: true.
It makes no sense that the body parameter of a patch operation is optional. And in addition, in previous version, the body parameter is required. This impacts the SDKs too much.

Copy link
Contributor Author

@prajjwalsrivastav prajjwalsrivastav May 31, 2022

Choose a reason for hiding this comment

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

Made required: true

}
],
"responses": {
Expand Down Expand Up @@ -744,6 +750,9 @@
"Monitor": {
"type": "object",
"properties": {
"identity": {
"$ref": "./commonTypes.json#/definitions/UserAssignedServiceIdentity"
},
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/MonitorProperties",
Expand Down Expand Up @@ -823,6 +832,22 @@
},
"description": "Describes the properties of a SAP monitor."
},
"UpdateMonitorRequest": {
"description": "Defines the request body for updating SAP monitor resource.",
"type": "object",
"properties": {
"tags": {
"description": "Gets or sets the Resource tags.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"identity": {
"$ref": "./commonTypes.json#/definitions/UserAssignedServiceIdentity"
}
}
},
"ProviderInstanceListResult": {
"type": "object",
"properties": {
Expand All @@ -843,6 +868,9 @@
"ProviderInstance": {
"type": "object",
"properties": {
"identity": {
"$ref": "./commonTypes.json#/definitions/UserAssignedServiceIdentity"
},
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/ProviderInstanceProperties",
Expand Down Expand Up @@ -1156,16 +1184,6 @@
"description": "Name of the provider instance.",
"x-ms-parameter-location": "method"
},
"TagsParameter": {
"name": "tagsParameter",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Tags"
},
"description": "Request body that only contains the new Tags field",
"x-ms-parameter-location": "method"
},
"MonitorParameter": {
"name": "MonitorParameter",
"in": "body",
Expand Down