From 057fa585c7c07989de56c65bc05d327b0d145e6b Mon Sep 17 00:00:00 2001 From: Varun Kumar Yadav Date: Tue, 15 Sep 2020 22:50:55 -0700 Subject: [PATCH 1/9] Fixed Swagger linting ARM & SDK issues. --- .../managedapplications.json | 26 +++-- .../examples/listSolutionsOperations.json | 30 ++++++ .../2018-06-01/managedapplications.json | 99 +++++++++++++++++-- .../2019-07-01/managedapplications.json | 26 +++-- 4 files changed, 163 insertions(+), 18 deletions(-) create mode 100644 specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listSolutionsOperations.json diff --git a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json index 58091ce4a537..189da2a5f85c 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json @@ -272,7 +272,7 @@ "name": "parameters", "in": "body", "schema": { - "$ref": "#/definitions/Application" + "$ref": "#/definitions/ApplicationPatchable" }, "description": "Parameters supplied to update an existing managed application." }, @@ -287,7 +287,7 @@ "200": { "description": "Created - Returns information about the managed application, including provisioning status.", "schema": { - "$ref": "#/definitions/Application" + "$ref": "#/definitions/ApplicationPatchable" } }, "default": { @@ -1106,7 +1106,7 @@ } }, "x-ms-paths": { - "/{applicationDefinitionId}?disambiguation_dummy": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}?disambiguation_dummy": { "get": { "tags": [ "ApplicationDefinitions" @@ -1115,15 +1115,29 @@ "description": "Gets the managed application definition.", "parameters": [ { - "name": "applicationDefinitionId", + "name": "resourceGroupName", "in": "path", "required": true, "type": "string", - "description": "The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}", - "x-ms-skip-url-encoding": true + "description": "The name of the resource group. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "applicationDefinitionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the managed application definition.", + "minLength": 3, + "maxLength": 64 }, { "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listSolutionsOperations.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listSolutionsOperations.json new file mode 100644 index 000000000000..55f367f84dc3 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listSolutionsOperations.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2018-06-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "name": "SolutionsOpeartion1", + "display": { + "provider": "Microsoft.ResourceProvider", + "resource": "Resource1", + "operation": "Read" + } + }, + { + "name": "SolutionssOpeartion2", + "display": { + "provider": "Microsoft.ResourceProvider", + "resource": "Resource2", + "operation": "Write" + } + } + ] + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json index 2702391b5df7..aaf2b7fc4f88 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json @@ -34,6 +34,36 @@ } }, "paths": { + "/providers/Microsoft.Solutions/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "ListOperations", + "description": "Lists all of the available Microsoft.Solutions REST API operations.", + "x-ms-examples": { + "List Solutions operations": { + "$ref": "./examples/listSolutionsOperations.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}": { "get": { "tags": [ @@ -239,7 +269,7 @@ "name": "parameters", "in": "body", "schema": { - "$ref": "#/definitions/Application" + "$ref": "#/definitions/ApplicationPatchable" }, "description": "Parameters supplied to update an existing managed application." }, @@ -254,7 +284,7 @@ "200": { "description": "Created - Returns information about the managed application, including provisioning status.", "schema": { - "$ref": "#/definitions/Application" + "$ref": "#/definitions/ApplicationPatchable" } }, "default": { @@ -745,7 +775,7 @@ } }, "x-ms-paths": { - "/{applicationDefinitionId}?disambiguation_dummy": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}?disambiguation_dummy": { "get": { "tags": [ "ApplicationDefinitions" @@ -754,15 +784,29 @@ "description": "Gets the managed application definition.", "parameters": [ { - "name": "applicationDefinitionId", + "name": "resourceGroupName", "in": "path", "required": true, "type": "string", - "description": "The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}", - "x-ms-skip-url-encoding": true + "description": "The name of the resource group. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "applicationDefinitionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the managed application definition.", + "minLength": 3, + "maxLength": 64 }, { "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -1351,6 +1395,49 @@ "type": "string" } } + }, + "Operation": { + "description": "Microsoft.Solutions 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.Solutions", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed: Application, JitRequest, etc.", + "type": "string" + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string" + } + } + } + } + }, + "OperationListResult": { + "description": "Result of the request to list Microsoft.Solutions 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.Solutions operations." + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results if there are any." + } + } } }, "parameters": { diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json index 6a3432f615ea..9f9be03d4aeb 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json @@ -266,7 +266,7 @@ "name": "parameters", "in": "body", "schema": { - "$ref": "#/definitions/Application" + "$ref": "#/definitions/ApplicationPatchable" }, "description": "Parameters supplied to update an existing managed application." }, @@ -281,7 +281,7 @@ "200": { "description": "Created - Returns information about the managed application, including provisioning status.", "schema": { - "$ref": "#/definitions/Application" + "$ref": "#/definitions/ApplicationPatchable" } }, "default": { @@ -1097,7 +1097,7 @@ } }, "x-ms-paths": { - "/{applicationDefinitionId}?disambiguation_dummy": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}?disambiguation_dummy": { "get": { "tags": [ "ApplicationDefinitions" @@ -1106,15 +1106,29 @@ "description": "Gets the managed application definition.", "parameters": [ { - "name": "applicationDefinitionId", + "name": "resourceGroupName", "in": "path", "required": true, "type": "string", - "description": "The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}", - "x-ms-skip-url-encoding": true + "description": "The name of the resource group. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "applicationDefinitionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the managed application definition.", + "minLength": 3, + "maxLength": 64 }, { "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { From bb225402ddeac1d81e76a4f3765404eb84ef8158 Mon Sep 17 00:00:00 2001 From: Varun Kumar Yadav Date: Tue, 15 Sep 2020 23:05:40 -0700 Subject: [PATCH 2/9] Fixed Swagger linting ARM & SDK issues. --- .../managedapplications.json | 46 +++++++++++++++---- .../2018-06-01/managedapplications.json | 46 +++++++++++++++---- .../2019-07-01/managedapplications.json | 46 +++++++++++++++---- 3 files changed, 111 insertions(+), 27 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json index 189da2a5f85c..dca9f9b3936a 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json @@ -1163,15 +1163,29 @@ "description": "Deletes the managed application definition.", "parameters": [ { - "name": "applicationDefinitionId", + "name": "resourceGroupName", "in": "path", "required": true, "type": "string", - "description": "The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}", - "x-ms-skip-url-encoding": true + "description": "The name of the resource group. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "applicationDefinitionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the managed application definition.", + "minLength": 3, + "maxLength": 64 }, { "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -1201,12 +1215,29 @@ "description": "Creates a new managed application definition.", "parameters": [ { - "name": "applicationDefinitionId", + "name": "resourceGroupName", "in": "path", "required": true, "type": "string", - "description": "The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}", - "x-ms-skip-url-encoding": true + "description": "The name of the resource group. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "applicationDefinitionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the managed application definition.", + "minLength": 3, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" }, { "name": "parameters", @@ -1216,9 +1247,6 @@ "$ref": "#/definitions/ApplicationDefinition" }, "description": "Parameters supplied to the create or update a managed application definition." - }, - { - "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json index aaf2b7fc4f88..64e4160d016f 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json @@ -835,15 +835,29 @@ "description": "Deletes the managed application definition.", "parameters": [ { - "name": "applicationDefinitionId", + "name": "resourceGroupName", "in": "path", "required": true, "type": "string", - "description": "The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}", - "x-ms-skip-url-encoding": true + "description": "The name of the resource group. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "applicationDefinitionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the managed application definition.", + "minLength": 3, + "maxLength": 64 }, { "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -873,12 +887,29 @@ "description": "Creates a new managed application definition.", "parameters": [ { - "name": "applicationDefinitionId", + "name": "resourceGroupName", "in": "path", "required": true, "type": "string", - "description": "The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}", - "x-ms-skip-url-encoding": true + "description": "The name of the resource group. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "applicationDefinitionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the managed application definition.", + "minLength": 3, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" }, { "name": "parameters", @@ -888,9 +919,6 @@ "$ref": "#/definitions/ApplicationDefinition" }, "description": "Parameters supplied to the create or update a managed application definition." - }, - { - "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json index 9f9be03d4aeb..3584a21bd272 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json @@ -1154,15 +1154,29 @@ "description": "Deletes the managed application definition.", "parameters": [ { - "name": "applicationDefinitionId", + "name": "resourceGroupName", "in": "path", "required": true, "type": "string", - "description": "The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}", - "x-ms-skip-url-encoding": true + "description": "The name of the resource group. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "applicationDefinitionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the managed application definition.", + "minLength": 3, + "maxLength": 64 }, { "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -1192,12 +1206,29 @@ "description": "Creates a new managed application definition.", "parameters": [ { - "name": "applicationDefinitionId", + "name": "resourceGroupName", "in": "path", "required": true, "type": "string", - "description": "The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}", - "x-ms-skip-url-encoding": true + "description": "The name of the resource group. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + { + "name": "applicationDefinitionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the managed application definition.", + "minLength": 3, + "maxLength": 64 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" }, { "name": "parameters", @@ -1207,9 +1238,6 @@ "$ref": "#/definitions/ApplicationDefinition" }, "description": "Parameters supplied to the create or update a managed application definition." - }, - { - "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { From 5b46bd4430ed3be3725036330a5257cfeca81a07 Mon Sep 17 00:00:00 2001 From: Varun Kumar Yadav Date: Tue, 15 Sep 2020 23:43:15 -0700 Subject: [PATCH 3/9] Fixed model validation & example errors. --- .../preview/2020-08-21-preview/managedapplications.json | 2 +- .../2018-06-01/examples/createOrUpdateApplication.json | 4 +--- .../examples/createOrUpdateApplicationDefinition.json | 5 ++--- .../stable/2018-06-01/examples/getApplication.json | 4 +--- .../stable/2018-06-01/examples/getApplicationDefinition.json | 5 ++--- .../examples/listApplicationDefinitionsByResourceGroup.json | 4 +--- .../2018-06-01/examples/listApplicationsByResourceGroup.json | 4 ---- .../stable/2018-06-01/managedapplications.json | 2 +- .../stable/2019-07-01/managedapplications.json | 2 +- 9 files changed, 10 insertions(+), 22 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json index dca9f9b3936a..9a70b6c9ae8e 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json @@ -1310,7 +1310,7 @@ "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/ApplicationPropertiesPatchable", + "$ref": "#/definitions/ApplicationProperties", "description": "The managed application properties." }, "plan": { diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json index 957c3d0ec451..34d5944feca7 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "subid", "resourceGroupName": "rg", - "managedApplicationName": "myManagedApplication", + "applicationName": "myManagedApplication", "api-version": "2018-06-01", "parameters": { "properties": { @@ -23,14 +23,12 @@ "type": "Microsoft.Solutions/applications", "location": "East US 2", "managedBy": null, - "resourceGroup": "rg", "tags": null, "plan": null, "identity": null, "kind": "ServiceCatalog", "sku": null, "properties": { - "managedApplicationDefinitionId": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef", "managedResourceGroupId": "/subscriptions/subid/resourceGroups/myManagedRG", "outputs": null, "parameters": null, diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplicationDefinition.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplicationDefinition.json index 6e1863f58728..acd8654e8e3c 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplicationDefinition.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplicationDefinition.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "subid", "resourceGroupName": "rg", - "managedApplicationDefinitionName": "myManagedApplicationDef", + "applicationDefinitionName": "myManagedApplicationDef", "api-version": "2018-06-01", "parameters": { "properties": { @@ -29,7 +29,6 @@ "type": "Microsoft.Solutions/applicationDefinitions", "location": "East US 2", "managedBy": null, - "resourceGroup": "rg", "tags": null, "identity": null, "sku": null, @@ -54,7 +53,7 @@ ], "description": "myManagedApplicationDef description", "displayName": "myManagedApplicationDef", - "lockLevel": null, + "lockLevel": "None", "packageFileUri": "https://path/to/packagezipfile" } } diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplication.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplication.json index cf83b23e112d..b13e31824343 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplication.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplication.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "subid", "resourceGroupName": "rg", - "managedApplicationName": "myManagedApplication", + "applicationName": "myManagedApplication", "api-version": "2018-06-01" }, "responses": { @@ -14,14 +14,12 @@ "type": "Microsoft.Solutions/applications", "location": "East US 2", "managedBy": null, - "resourceGroup": "rg", "tags": null, "plan": null, "identity": null, "kind": "ServiceCatalog", "sku": null, "properties": { - "managedApplicationDefinitionId": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/managedApplicationDefinitions/myAppDef", "managedResourceGroupId": "/subscriptions/subid/resourceGroups/myManagedRG", "outputs": null, "parameters": null, diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json index f3ee03cc02df..afd5ed8a6b62 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "subid", "resourceGroupName": "rg", - "managedApplicationName": "myManagedApplicationDef", + "applicationDefinitionName": "myManagedApplicationDef", "api-version": "2018-06-01" }, "responses": { @@ -14,7 +14,6 @@ "type": "Microsoft.Solutions/applicationDefinitions", "location": "East US 2", "managedBy": null, - "resourceGroup": "rg", "tags": null, "identity": null, "sku": null, @@ -39,7 +38,7 @@ ], "description": "myManagedApplicationDef description", "displayName": "myManagedApplicationDef", - "lockLevel": null, + "lockLevel": "None", "packageFileUri": "https://path/to/packagezipfile" } } diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationDefinitionsByResourceGroup.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationDefinitionsByResourceGroup.json index faec6495dd23..f5affc2aa527 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationDefinitionsByResourceGroup.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationDefinitionsByResourceGroup.json @@ -15,7 +15,6 @@ "type": "Microsoft.Solutions/applicationDefinitions", "location": "East US 2", "managedBy": null, - "resourceGroup": "rg", "tags": null, "identity": null, "sku": null, @@ -50,7 +49,6 @@ "type": "Microsoft.Solutions/applicationDefinitions", "location": "West US", "managedBy": null, - "resourceGroup": "rg", "tags": null, "identity": null, "sku": null, @@ -75,7 +73,7 @@ ], "description": "myManagedApplicationDef2 description", "displayName": "myManagedApplicationDef2", - "lockLevel": null, + "lockLevel": "None", "packageFileUri": "https://path/to/packagezipfile" } } diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationsByResourceGroup.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationsByResourceGroup.json index 2cea45e315b8..ffc143598fec 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationsByResourceGroup.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationsByResourceGroup.json @@ -15,14 +15,12 @@ "type": "Microsoft.Solutions/applications", "location": "East US 2", "managedBy": null, - "resourceGroup": "rg", "tags": null, "plan": null, "identity": null, "kind": "ServiceCatalog", "sku": null, "properties": { - "managedApplicationDefinitionId": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/managedApplicationDefinitions/myAppDef", "managedResourceGroupId": "/subscriptions/subid/resourceGroups/myManagedRG", "outputs": null, "parameters": null, @@ -35,14 +33,12 @@ "type": "Microsoft.Solutions/applications", "location": "West US", "managedBy": null, - "resourceGroup": "rg", "tags": null, "plan": null, "identity": null, "kind": "ServiceCatalog", "sku": null, "properties": { - "managedApplicationDefinitionId": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/managedApplicationDefinitions/myAppDef2", "managedResourceGroupId": "/subscriptions/subid/resourceGroups/myManagedRG", "outputs": null, "parameters": null, diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json index 64e4160d016f..ae8c3dc271ca 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json @@ -978,7 +978,7 @@ "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/ApplicationPropertiesPatchable", + "$ref": "#/definitions/ApplicationProperties", "description": "The managed application properties." }, "plan": { diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json index 3584a21bd272..65cbb25d49fa 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json @@ -1301,7 +1301,7 @@ "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/ApplicationPropertiesPatchable", + "$ref": "#/definitions/ApplicationProperties", "description": "The managed application properties." }, "plan": { From 25eef042a3bdcd9546c4cd9940b43f6037214597 Mon Sep 17 00:00:00 2001 From: Varun Kumar Yadav Date: Tue, 15 Sep 2020 23:52:33 -0700 Subject: [PATCH 4/9] Fixed example errors. --- .../stable/2018-06-01/examples/createOrUpdateApplication.json | 2 -- .../examples/listApplicationDefinitionsByResourceGroup.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json index 34d5944feca7..f47603db049d 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json @@ -6,10 +6,8 @@ "api-version": "2018-06-01", "parameters": { "properties": { - "managedApplicationDefinitionId": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef", "managedResourceGroupId": "/subscriptions/subid/resourceGroups/myManagedRG" }, - "name": "myManagedApplication", "location": "East US 2", "kind": "ServiceCatalog" } diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationDefinitionsByResourceGroup.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationDefinitionsByResourceGroup.json index f5affc2aa527..a7924b761b65 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationDefinitionsByResourceGroup.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationDefinitionsByResourceGroup.json @@ -39,7 +39,7 @@ ], "description": "myManagedApplicationDef description", "displayName": "myManagedApplicationDef", - "lockLevel": null, + "lockLevel": "None", "packageFileUri": "https://path/to/packagezipfile" } }, From 6942c86ca8c08bad7a242c6d60a348ad4dfd6851 Mon Sep 17 00:00:00 2001 From: Varun Kumar Yadav Date: Wed, 16 Sep 2020 00:09:27 -0700 Subject: [PATCH 5/9] Fixed example errors. --- .../examples/createOrUpdateApplication.json | 21 +++++++++++ .../createOrUpdateApplicationDefinition.json | 37 +++++++++++++++++++ .../2018-06-01/examples/getApplication.json | 3 +- .../examples/getApplicationDefinition.json | 3 +- .../2018-06-01/managedapplications.json | 2 +- 5 files changed, 63 insertions(+), 3 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json index f47603db049d..451460766d90 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json @@ -33,6 +33,27 @@ "provisioningState": "Created" } } + }, + "200": { + "headers": {}, + "body": { + "name": "myManagedApplication", + "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication", + "type": "Microsoft.Solutions/applications", + "location": "East US 2", + "managedBy": null, + "tags": null, + "plan": null, + "identity": null, + "kind": "ServiceCatalog", + "sku": null, + "properties": { + "managedResourceGroupId": "/subscriptions/subid/resourceGroups/myManagedRG", + "outputs": null, + "parameters": null, + "provisioningState": "Created" + } + } } } } diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplicationDefinition.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplicationDefinition.json index acd8654e8e3c..745348a35fe4 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplicationDefinition.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplicationDefinition.json @@ -57,6 +57,43 @@ "packageFileUri": "https://path/to/packagezipfile" } } + }, + "200": { + "headers": {}, + "body": { + "name": "myManagedApplicationDef", + "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myManagedApplicationDef", + "type": "Microsoft.Solutions/applicationDefinitions", + "location": "East US 2", + "managedBy": null, + "tags": null, + "identity": null, + "sku": null, + "properties": { + "artifacts": [ + { + "name": "CreateUiDefinition", + "type": "Custom", + "uri": "https://path/to/managedApplicationCreateUiDefinition.json" + }, + { + "name": "ManagedApplicationResourceTemplate", + "type": "Template", + "uri": "https://path/to/mainTemplate.json" + } + ], + "authorizations": [ + { + "principalId": "validprincipalguid", + "roleDefinitionId": "validroleguid" + } + ], + "description": "myManagedApplicationDef description", + "displayName": "myManagedApplicationDef", + "lockLevel": "None", + "packageFileUri": "https://path/to/packagezipfile" + } + } } } } diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplication.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplication.json index b13e31824343..339b581af507 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplication.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplication.json @@ -26,6 +26,7 @@ "provisioningState": "Created" } } - } + }, + "404": {} } } diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json index afd5ed8a6b62..4e88624938e9 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json @@ -42,6 +42,7 @@ "packageFileUri": "https://path/to/packagezipfile" } } - } + }, + "404" :{} } } diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json index ae8c3dc271ca..64e4160d016f 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json @@ -978,7 +978,7 @@ "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/ApplicationProperties", + "$ref": "#/definitions/ApplicationPropertiesPatchable", "description": "The managed application properties." }, "plan": { From d2fb347f2380e9f2967c4c92abb69f944a775710 Mon Sep 17 00:00:00 2001 From: Varun Kumar Yadav Date: Wed, 16 Sep 2020 00:21:12 -0700 Subject: [PATCH 6/9] Prettier check commit. --- .../stable/2018-06-01/examples/getApplicationDefinition.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json index 4e88624938e9..b6886c726d4d 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json @@ -43,6 +43,6 @@ } } }, - "404" :{} + "404": {} } } From d995c4e89d72470ad9b62876eb6893c77d9d4809 Mon Sep 17 00:00:00 2001 From: Varun Kumar Yadav Date: Thu, 17 Sep 2020 23:23:05 -0700 Subject: [PATCH 7/9] Added examples. --- .../examples/deleteApplicationDefinition.json | 49 ++++++++++++++++++ .../managedapplications.json | 15 ++++++ .../examples/deleteApplicationDefinition.json | 48 +++++++++++++++++ .../2018-06-01/managedapplications.json | 15 ++++++ .../examples/deleteApplicationDefinition.json | 51 +++++++++++++++++++ .../2019-07-01/managedapplications.json | 15 ++++++ 6 files changed, 193 insertions(+) create mode 100644 specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/examples/deleteApplicationDefinition.json create mode 100644 specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplicationDefinition.json create mode 100644 specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/examples/deleteApplicationDefinition.json diff --git a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/examples/deleteApplicationDefinition.json b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/examples/deleteApplicationDefinition.json new file mode 100644 index 000000000000..543bdd5ab96b --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/examples/deleteApplicationDefinition.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "subid", + "resourceGroupName": "rg", + "applicationDefinitionName": "myManagedApplicationDef", + "api-version": "2020-08-21-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "name": "myManagedApplicationDef", + "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myManagedApplicationDef", + "type": "Microsoft.Solutions/applicationDefinitions", + "managedBy": null, + "sku": null, + "properties": { + "artifacts": [ + { + "name": "CreateUiDefinition", + "type": "Custom", + "uri": "https://path/to/managedApplicationCreateUiDefinition.json" + }, + { + "name": "ApplicationResourceTemplate", + "type": "Template", + "uri": "https://path/to/mainTemplate.json" + } + ], + "authorizations": [ + { + "principalId": "validprincipalguid", + "roleDefinitionId": "validroleguid" + } + ], + "description": "myManagedApplicationDef description", + "displayName": "myManagedApplicationDef", + "lockLevel": "None", + "packageFileUri": "https://path/to/packagezipfile", + "notificationPolicy": null, + "lockingPolicy": null, + "deploymentPolicy": null, + "managementPolicy": null, + "policies": [] + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json index 9a70b6c9ae8e..20846d0b04c7 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json @@ -1113,6 +1113,11 @@ ], "operationId": "ApplicationDefinitions_GetById", "description": "Gets the managed application definition.", + "x-ms-examples": { + "Get managed application definition": { + "$ref": "./examples/getApplicationDefinition.json" + } + }, "parameters": [ { "name": "resourceGroupName", @@ -1161,6 +1166,11 @@ ], "operationId": "ApplicationDefinitions_DeleteById", "description": "Deletes the managed application definition.", + "x-ms-examples": { + "Get managed application definition": { + "$ref": "./examples/deleteApplicationDefinition.json" + } + }, "parameters": [ { "name": "resourceGroupName", @@ -1213,6 +1223,11 @@ ], "operationId": "ApplicationDefinitions_CreateOrUpdateById", "description": "Creates a new managed application definition.", + "x-ms-examples": { + "Create or update managed application definition": { + "$ref": "./examples/createOrUpdateApplicationDefinition.json" + } + }, "parameters": [ { "name": "resourceGroupName", diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplicationDefinition.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplicationDefinition.json new file mode 100644 index 000000000000..b6886c726d4d --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplicationDefinition.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "subid", + "resourceGroupName": "rg", + "applicationDefinitionName": "myManagedApplicationDef", + "api-version": "2018-06-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "name": "myManagedApplicationDef", + "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myManagedApplicationDef", + "type": "Microsoft.Solutions/applicationDefinitions", + "location": "East US 2", + "managedBy": null, + "tags": null, + "identity": null, + "sku": null, + "properties": { + "artifacts": [ + { + "name": "CreateUiDefinition", + "type": "Custom", + "uri": "https://path/to/managedApplicationCreateUiDefinition.json" + }, + { + "name": "ManagedApplicationResourceTemplate", + "type": "Template", + "uri": "https://path/to/mainTemplate.json" + } + ], + "authorizations": [ + { + "principalId": "validprincipalguid", + "roleDefinitionId": "validroleguid" + } + ], + "description": "myManagedApplicationDef description", + "displayName": "myManagedApplicationDef", + "lockLevel": "None", + "packageFileUri": "https://path/to/packagezipfile" + } + } + }, + "404": {} + } +} diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json index 64e4160d016f..12ee9c42bfc9 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json @@ -782,6 +782,11 @@ ], "operationId": "ApplicationDefinitions_GetById", "description": "Gets the managed application definition.", + "x-ms-examples": { + "Get managed application definition": { + "$ref": "./examples/getApplicationDefinition.json" + } + }, "parameters": [ { "name": "resourceGroupName", @@ -833,6 +838,11 @@ ], "operationId": "ApplicationDefinitions_DeleteById", "description": "Deletes the managed application definition.", + "x-ms-examples": { + "Get managed application definition": { + "$ref": "./examples/deleteApplicationDefinition.json" + } + }, "parameters": [ { "name": "resourceGroupName", @@ -885,6 +895,11 @@ ], "operationId": "ApplicationDefinitions_CreateOrUpdateById", "description": "Creates a new managed application definition.", + "x-ms-examples": { + "Create or update managed application definition": { + "$ref": "./examples/createOrUpdateApplicationDefinition.json" + } + }, "parameters": [ { "name": "resourceGroupName", diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/examples/deleteApplicationDefinition.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/examples/deleteApplicationDefinition.json new file mode 100644 index 000000000000..2b3b9fc39618 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/examples/deleteApplicationDefinition.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "subid", + "resourceGroupName": "rg", + "applicationDefinitionName": "myManagedApplicationDef", + "api-version": "2019-07-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "name": "myManagedApplicationDef", + "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myManagedApplicationDef", + "type": "Microsoft.Solutions/applicationDefinitions", + "location": "East US 2", + "managedBy": null, + "tags": null, + "sku": null, + "properties": { + "artifacts": [ + { + "name": "CreateUiDefinition", + "type": "Custom", + "uri": "https://path/to/managedApplicationCreateUiDefinition.json" + }, + { + "name": "ApplicationResourceTemplate", + "type": "Template", + "uri": "https://path/to/mainTemplate.json" + } + ], + "authorizations": [ + { + "principalId": "validprincipalguid", + "roleDefinitionId": "validroleguid" + } + ], + "description": "myManagedApplicationDef description", + "displayName": "myManagedApplicationDef", + "lockLevel": "None", + "packageFileUri": "https://path/to/packagezipfile", + "notificationPolicy": null, + "lockingPolicy": null, + "deploymentPolicy": null, + "managementPolicy": null, + "policies": [] + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json index 65cbb25d49fa..dbd2eb8f78fb 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json @@ -1104,6 +1104,11 @@ ], "operationId": "ApplicationDefinitions_GetById", "description": "Gets the managed application definition.", + "x-ms-examples": { + "Get managed application definition": { + "$ref": "./examples/getApplicationDefinition.json" + } + }, "parameters": [ { "name": "resourceGroupName", @@ -1152,6 +1157,11 @@ ], "operationId": "ApplicationDefinitions_DeleteById", "description": "Deletes the managed application definition.", + "x-ms-examples": { + "Get managed application definition": { + "$ref": "./examples/deleteApplicationDefinition.json" + } + }, "parameters": [ { "name": "resourceGroupName", @@ -1204,6 +1214,11 @@ ], "operationId": "ApplicationDefinitions_CreateOrUpdateById", "description": "Creates a new managed application definition.", + "x-ms-examples": { + "Create or update managed application definition": { + "$ref": "./examples/createOrUpdateApplicationDefinition.json" + } + }, "parameters": [ { "name": "resourceGroupName", From e34386d3826ea614d9c6bc98dba1831cb6ea7c10 Mon Sep 17 00:00:00 2001 From: Varun Kumar Yadav Date: Thu, 17 Sep 2020 23:34:23 -0700 Subject: [PATCH 8/9] Added examples. --- .../examples/deleteApplicationDefinition.json | 42 ++---------------- .../examples/deleteApplicationDefinition.json | 41 ++--------------- .../examples/deleteApplicationDefinition.json | 44 ++----------------- 3 files changed, 9 insertions(+), 118 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/examples/deleteApplicationDefinition.json b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/examples/deleteApplicationDefinition.json index 543bdd5ab96b..ec85348c1fa0 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/examples/deleteApplicationDefinition.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/examples/deleteApplicationDefinition.json @@ -6,44 +6,8 @@ "api-version": "2020-08-21-preview" }, "responses": { - "200": { - "headers": {}, - "body": { - "name": "myManagedApplicationDef", - "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myManagedApplicationDef", - "type": "Microsoft.Solutions/applicationDefinitions", - "managedBy": null, - "sku": null, - "properties": { - "artifacts": [ - { - "name": "CreateUiDefinition", - "type": "Custom", - "uri": "https://path/to/managedApplicationCreateUiDefinition.json" - }, - { - "name": "ApplicationResourceTemplate", - "type": "Template", - "uri": "https://path/to/mainTemplate.json" - } - ], - "authorizations": [ - { - "principalId": "validprincipalguid", - "roleDefinitionId": "validroleguid" - } - ], - "description": "myManagedApplicationDef description", - "displayName": "myManagedApplicationDef", - "lockLevel": "None", - "packageFileUri": "https://path/to/packagezipfile", - "notificationPolicy": null, - "lockingPolicy": null, - "deploymentPolicy": null, - "managementPolicy": null, - "policies": [] - } - } - } + "200": {}, + "202": {}, + "204": {} } } diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplicationDefinition.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplicationDefinition.json index b6886c726d4d..72e9f6531a59 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplicationDefinition.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplicationDefinition.json @@ -6,43 +6,8 @@ "api-version": "2018-06-01" }, "responses": { - "200": { - "headers": {}, - "body": { - "name": "myManagedApplicationDef", - "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myManagedApplicationDef", - "type": "Microsoft.Solutions/applicationDefinitions", - "location": "East US 2", - "managedBy": null, - "tags": null, - "identity": null, - "sku": null, - "properties": { - "artifacts": [ - { - "name": "CreateUiDefinition", - "type": "Custom", - "uri": "https://path/to/managedApplicationCreateUiDefinition.json" - }, - { - "name": "ManagedApplicationResourceTemplate", - "type": "Template", - "uri": "https://path/to/mainTemplate.json" - } - ], - "authorizations": [ - { - "principalId": "validprincipalguid", - "roleDefinitionId": "validroleguid" - } - ], - "description": "myManagedApplicationDef description", - "displayName": "myManagedApplicationDef", - "lockLevel": "None", - "packageFileUri": "https://path/to/packagezipfile" - } - } - }, - "404": {} + "204": {}, + "200": {}, + "202": {} } } diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/examples/deleteApplicationDefinition.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/examples/deleteApplicationDefinition.json index 2b3b9fc39618..c542a5d3dd5f 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/examples/deleteApplicationDefinition.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/examples/deleteApplicationDefinition.json @@ -6,46 +6,8 @@ "api-version": "2019-07-01" }, "responses": { - "200": { - "headers": {}, - "body": { - "name": "myManagedApplicationDef", - "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myManagedApplicationDef", - "type": "Microsoft.Solutions/applicationDefinitions", - "location": "East US 2", - "managedBy": null, - "tags": null, - "sku": null, - "properties": { - "artifacts": [ - { - "name": "CreateUiDefinition", - "type": "Custom", - "uri": "https://path/to/managedApplicationCreateUiDefinition.json" - }, - { - "name": "ApplicationResourceTemplate", - "type": "Template", - "uri": "https://path/to/mainTemplate.json" - } - ], - "authorizations": [ - { - "principalId": "validprincipalguid", - "roleDefinitionId": "validroleguid" - } - ], - "description": "myManagedApplicationDef description", - "displayName": "myManagedApplicationDef", - "lockLevel": "None", - "packageFileUri": "https://path/to/packagezipfile", - "notificationPolicy": null, - "lockingPolicy": null, - "deploymentPolicy": null, - "managementPolicy": null, - "policies": [] - } - } - } + "200": {}, + "202": {}, + "204": {} } } From f9fc2d73ad70827428065857e5ef8ff83e82c019 Mon Sep 17 00:00:00 2001 From: Varun Kumar Yadav Date: Thu, 17 Sep 2020 23:54:13 -0700 Subject: [PATCH 9/9] Added examples. --- .../preview/2020-08-21-preview/managedapplications.json | 2 +- .../stable/2018-06-01/managedapplications.json | 2 +- .../stable/2019-07-01/managedapplications.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json index 20846d0b04c7..285104f4ea18 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json @@ -287,7 +287,7 @@ "200": { "description": "Created - Returns information about the managed application, including provisioning status.", "schema": { - "$ref": "#/definitions/ApplicationPatchable" + "$ref": "#/definitions/Application" } }, "default": { diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json index 12ee9c42bfc9..2653ec9878f1 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/managedapplications.json @@ -284,7 +284,7 @@ "200": { "description": "Created - Returns information about the managed application, including provisioning status.", "schema": { - "$ref": "#/definitions/ApplicationPatchable" + "$ref": "#/definitions/Application" } }, "default": { diff --git a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json index dbd2eb8f78fb..df4427a208ec 100644 --- a/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json +++ b/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json @@ -281,7 +281,7 @@ "200": { "description": "Created - Returns information about the managed application, including provisioning status.", "schema": { - "$ref": "#/definitions/ApplicationPatchable" + "$ref": "#/definitions/Application" } }, "default": {