From 3a9c6d4260aa5f91e429ff72b98b60911c6aa95f Mon Sep 17 00:00:00 2001 From: guepsh Date: Tue, 15 Dec 2020 12:18:44 +0200 Subject: [PATCH 1/6] Fixes for SDK generation files. --- .../resource-manager/readme.csharp.md | 4 +-- .../healthbot/resource-manager/readme.go.md | 26 +++++++++++++++++++ .../resource-manager/readme.python.md | 6 ++--- .../resource-manager/readme.typescript.md | 4 +-- 4 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 specification/healthbot/resource-manager/readme.go.md diff --git a/specification/healthbot/resource-manager/readme.csharp.md b/specification/healthbot/resource-manager/readme.csharp.md index 14c4be9d14f0..babfcdff06b1 100644 --- a/specification/healthbot/resource-manager/readme.csharp.md +++ b/specification/healthbot/resource-manager/readme.csharp.md @@ -10,6 +10,6 @@ csharp: payload-flattening-threshold: 1 clear-output-folder: true client-side-validation: false - namespace: Microsoft.HealthBot - output-folder: $(csharp-sdks-folder)/healthbot/management/Microsoft.HealthBot/GeneratedProtocol + namespace: Microsoft.Azure.Management.Healthbot + output-folder: $(csharp-sdks-folder)/healthbot/management/Microsoft.Azure.Management.Healthbot/src/Generated ``` diff --git a/specification/healthbot/resource-manager/readme.go.md b/specification/healthbot/resource-manager/readme.go.md new file mode 100644 index 000000000000..69c8db2aabba --- /dev/null +++ b/specification/healthbot/resource-manager/readme.go.md @@ -0,0 +1,26 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +``` yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + clear-output-folder: true + namespace: healthbot +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2020-12-08 +``` + +### Tag: package-2020-12-08 and go + +These settings apply only when `--tag=package-2020-12-08 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag)=='package-2020-12-08' && $(go) +output-folder: $(go-sdk-folder)/services/$(namespace)/mgmt/2020-12-08/$(namespace) +``` diff --git a/specification/healthbot/resource-manager/readme.python.md b/specification/healthbot/resource-manager/readme.python.md index 1dbb61e1a22f..e15aac93a9f0 100644 --- a/specification/healthbot/resource-manager/readme.python.md +++ b/specification/healthbot/resource-manager/readme.python.md @@ -8,8 +8,8 @@ python: azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION payload-flattening-threshold: 2 - namespace: Microsoft.HealthBot - package-name: healthbot + namespace: azure.mgmt.healthbot + package-name: azure-mgmt-healthbot package-version: 2020-10-20-preview clear-output-folder: true ``` @@ -17,5 +17,5 @@ python: ```yaml $(python) python: no-namespace-folders: true - output-folder: $(python-sdks-folder)/azure-mgmt/healthbot + output-folder: $(python-sdks-folder)/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot ``` diff --git a/specification/healthbot/resource-manager/readme.typescript.md b/specification/healthbot/resource-manager/readme.typescript.md index 5186c93d66ef..5d614efa9767 100644 --- a/specification/healthbot/resource-manager/readme.typescript.md +++ b/specification/healthbot/resource-manager/readme.typescript.md @@ -6,8 +6,8 @@ Please also specify `--typescript-sdks-folder= Date: Tue, 15 Dec 2020 12:48:17 +0200 Subject: [PATCH 2/6] Fixes for SDK generation files. --- specification/healthbot/resource-manager/readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/healthbot/resource-manager/readme.md b/specification/healthbot/resource-manager/readme.md index 1b3c77397058..c47fadff790c 100644 --- a/specification/healthbot/resource-manager/readme.md +++ b/specification/healthbot/resource-manager/readme.md @@ -108,3 +108,7 @@ See configuration in [readme.typescript.md](./readme.typescript.md) ## CSharp See configuration in [readme.csharp.md](./readme.csharp.md) + +## GO + +See configuration in [readme.go.md](./readme.go.md) From c70de846c7ebaaf767ac4dad2a683c91e1873b4c Mon Sep 17 00:00:00 2001 From: guepsh Date: Tue, 15 Dec 2020 12:51:07 +0200 Subject: [PATCH 3/6] Added GO. --- specification/healthbot/resource-manager/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/healthbot/resource-manager/readme.md b/specification/healthbot/resource-manager/readme.md index c47fadff790c..3e51ddf1c0f4 100644 --- a/specification/healthbot/resource-manager/readme.md +++ b/specification/healthbot/resource-manager/readme.md @@ -88,6 +88,7 @@ swagger-to-sdk: - repo: azure-sdk-for-java - repo: azure-sdk-for-js - repo: azure-sdk-for-ruby + - repo: azure-sdk-for-go after_scripts: - bundle install && rake arm:regen_all_profiles['azure_mgmt_healthbot'] - repo: azure-cli-extensions From 355fce9d90327c3bf6d9baad541cda8542407df3 Mon Sep 17 00:00:00 2001 From: guepsh Date: Tue, 15 Dec 2020 13:16:13 +0200 Subject: [PATCH 4/6] Change Healthcare bot to Healthbot. --- .../stable/2020-12-08/healthbot.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json index 514141fb7603..5eca5254d73e 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json @@ -87,7 +87,7 @@ "$ref": "./examples/ResourceCreationPut.json" } }, - "description": "Create a new Healthcare Bot.", + "description": "Create a new HealthBot.", "parameters": [ { "$ref": "#/parameters/subscriptionIdParameter" @@ -143,7 +143,7 @@ "$ref": "./examples/ResourceInfoGet.json" } }, - "description": "Get a Healthcare Bot.", + "description": "Get a HealthBot.", "parameters": [ { "$ref": "#/parameters/subscriptionIdParameter" @@ -180,7 +180,7 @@ "$ref": "./examples/ResourceUpdatePatch.json" } }, - "description": "Patch a Healthcare Bot.", + "description": "Patch a HealthBot.", "parameters": [ { "$ref": "#/parameters/subscriptionIdParameter" @@ -232,7 +232,7 @@ "$ref": "./examples/ResourceDeletionDelete.json" } }, - "description": "Delete a Healthcare Bot.", + "description": "Delete a HealthBot.", "parameters": [ { "$ref": "#/parameters/subscriptionIdParameter" @@ -536,7 +536,7 @@ }, "properties": { "$ref": "#/definitions/HealthBotProperties", - "description": "The set of properties specific to healthcare bot resource." + "description": "The set of properties specific to Healthbot resource." } } }, @@ -546,7 +546,7 @@ "properties": { "provisioningState": { "type": "string", - "description": "The provisioning state of the Healthcare bot resource.", + "description": "The provisioning state of the Healthbot resource.", "readOnly": true }, "botManagementPortalLink": { @@ -771,10 +771,10 @@ "items": { "$ref": "#/definitions/HealthBot" }, - "description": "Gets the list of healthcare bot results and their properties." + "description": "Gets the list of Healthbot results and their properties." } }, - "description": "The list of healthcare bot operation response." + "description": "The list of Healthbot operation response." } }, "parameters": { From f6fbd3d957d1c80fc028e209fd91a7b55a45f4a4 Mon Sep 17 00:00:00 2001 From: guepsh Date: Tue, 22 Dec 2020 16:32:34 +0200 Subject: [PATCH 5/6] 1. Remove unused properties of SKU. 2. Removed unused CheckNameAvailability.json 3. Remove subgroup. --- .../examples/CheckNameAvailability.json | 18 --- .../stable/2020-12-08/healthbot.json | 103 ------------------ .../healthbot/resource-manager/readme.az.md | 9 ++ 3 files changed, 9 insertions(+), 121 deletions(-) delete mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/CheckNameAvailability.json diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/CheckNameAvailability.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/CheckNameAvailability.json deleted file mode 100644 index f14501e01a0f..000000000000 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/CheckNameAvailability.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2020-12-08", - "subscriptionId": "subscription-id", - "parameters": { - "name": "MyBot", - "type": "string" - } - }, - "responses": { - "200": { - "body": { - "nameAvailable": true, - "message": "" - } - } - } -} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json index 5eca5254d73e..28c0a5fbadcf 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json @@ -37,48 +37,6 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.HealthBot/checkNameAvailability": { - "post": { - "description": "Check whether a bot name is available.", - "operationId": "Bots_CheckNameAvailability", - "x-ms-examples": { - "check Name Availability": { - "$ref": "./examples/CheckNameAvailability.json" - } - }, - "parameters": [ - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CheckNameAvailabilityRequestBody" - }, - "description": "The request body parameters to provide for the check name availability request" - }, - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "The resource provider should return 200 (OK) to indicate that the operation completed successfully. For other errors (e.g. internal errors) use the appropriate HTTP error code.", - "schema": { - "$ref": "#/definitions/CheckNameAvailabilityResponseBody" - } - }, - "default": { - "description": "Error response describing why the operation failed", - "schema": { - "$ref": "#/definitions/Error" - } - } - } - } - }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}": { "put": { "operationId": "Bots_Create", @@ -395,73 +353,12 @@ "name": "SkuName", "modelAsString": false } - }, - "tier": { - "type": "string", - "enum": [ - "Free", - "Standard" - ], - "x-ms-enum": { - "name": "SkuTier", - "modelAsString": false - }, - "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." - }, - "size": { - "type": "string", - "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " - }, - "family": { - "type": "string", - "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." - }, - "capacity": { - "type": "integer", - "format": "int32", - "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." } }, "required": [ "name" ] }, - "CheckNameAvailabilityRequestBody": { - "description": "The request body for a request to to check availability of a bot name.", - "type": "object", - "properties": { - "name": { - "description": "the name of the bot for which availability needs to be checked.", - "type": "string" - }, - "type": { - "description": "the type of the bot for which availability needs to be checked", - "type": "string" - } - }, - "required": [ - "name", - "type" - ] - }, - "CheckNameAvailabilityResponseBody": { - "description": "The response body returned for a request to check availability of a bot name.", - "type": "object", - "properties": { - "nameAvailable": { - "description": "indicates if the bot name is valid and available.", - "type": "boolean" - }, - "reason": { - "description": "Reason for the result", - "type": "string" - }, - "message": { - "description": "additional message from server", - "type": "string" - } - } - }, "Resource": { "description": "The resource model definition for a ARM tracked top level resource", "x-ms-azure-resource": true, diff --git a/specification/healthbot/resource-manager/readme.az.md b/specification/healthbot/resource-manager/readme.az.md index c9d3b5ca5a94..83164380aa49 100644 --- a/specification/healthbot/resource-manager/readme.az.md +++ b/specification/healthbot/resource-manager/readme.az.md @@ -10,3 +10,12 @@ az: az-output-folder: $(azure-cli-extension-folder)/src/healthbot python-sdk-output-folder: "$(az-output-folder)/azext_healthbot/vendored_sdks/healthbot" ``` + +``` yaml +directive: + - where: + group: healthbot bot + set: + group: healthbot + +``` From 0ccd77b6c7ef6edd293f98df394ca4e50c38f27f Mon Sep 17 00:00:00 2001 From: guepsh Date: Tue, 22 Dec 2020 16:57:34 +0200 Subject: [PATCH 6/6] Sku is required. --- .../Microsoft.HealthBot/stable/2020-12-08/healthbot.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json index 28c0a5fbadcf..a0007dbc1075 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json @@ -435,7 +435,10 @@ "$ref": "#/definitions/HealthBotProperties", "description": "The set of properties specific to Healthbot resource." } - } + }, + "required": [ + "sku" + ] }, "HealthBotProperties": { "title": "HealthBotProperties",