Skip to content

Commit

Permalink
Required changes for Azure HealthBot swagger (#12124)
Browse files Browse the repository at this point in the history
* Fixes for SDK generation files.

* Fixes for SDK generation files.

* Added GO.

* Change Healthcare bot to Healthbot.

* 1. Remove unused properties of SKU.
2. Removed unused CheckNameAvailability.json
3. Remove subgroup.

* Sku is required.
  • Loading branch information
guy-microsoft committed Dec 24, 2020
1 parent 06fd66a commit 1aceb59
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 137 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -87,7 +45,7 @@
"$ref": "./examples/ResourceCreationPut.json"
}
},
"description": "Create a new Healthcare Bot.",
"description": "Create a new HealthBot.",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
Expand Down Expand Up @@ -143,7 +101,7 @@
"$ref": "./examples/ResourceInfoGet.json"
}
},
"description": "Get a Healthcare Bot.",
"description": "Get a HealthBot.",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
Expand Down Expand Up @@ -180,7 +138,7 @@
"$ref": "./examples/ResourceUpdatePatch.json"
}
},
"description": "Patch a Healthcare Bot.",
"description": "Patch a HealthBot.",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
Expand Down Expand Up @@ -232,7 +190,7 @@
"$ref": "./examples/ResourceDeletionDelete.json"
}
},
"description": "Delete a Healthcare Bot.",
"description": "Delete a HealthBot.",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -536,17 +433,20 @@
},
"properties": {
"$ref": "#/definitions/HealthBotProperties",
"description": "The set of properties specific to healthcare bot resource."
"description": "The set of properties specific to Healthbot resource."
}
}
},
"required": [
"sku"
]
},
"HealthBotProperties": {
"title": "HealthBotProperties",
"description": "The properties of a HealthBot. The Health Bot Service is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs.",
"properties": {
"provisioningState": {
"type": "string",
"description": "The provisioning state of the Healthcare bot resource.",
"description": "The provisioning state of the Healthbot resource.",
"readOnly": true
},
"botManagementPortalLink": {
Expand Down Expand Up @@ -771,10 +671,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": {
Expand Down
9 changes: 9 additions & 0 deletions specification/healthbot/resource-manager/readme.az.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
4 changes: 2 additions & 2 deletions specification/healthbot/resource-manager/readme.csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
26 changes: 26 additions & 0 deletions specification/healthbot/resource-manager/readme.go.md
Original file line number Diff line number Diff line change
@@ -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=<path to the root directory of your azure-sdk-for-go clone>`.

``` yaml $(tag)=='package-2020-12-08' && $(go)
output-folder: $(go-sdk-folder)/services/$(namespace)/mgmt/2020-12-08/$(namespace)
```
5 changes: 5 additions & 0 deletions specification/healthbot/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -108,3 +109,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)
6 changes: 3 additions & 3 deletions specification/healthbot/resource-manager/readme.python.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ 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
```
```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
```
4 changes: 2 additions & 2 deletions specification/healthbot/resource-manager/readme.typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Please also specify `--typescript-sdks-folder=<path to root folder of your azure
```yaml $(typescript)
typescript:
azure-arm: true
package-name: "healthbot"
output-folder: "$(typescript-sdks-folder)/packages/healthbot"
package-name: "@azure/arm-healthbot"
output-folder: "$(typescript-sdks-folder)/sdk/healthbot/arm-healthbot"
payload-flattening-threshold: 1
generate-metadata: true
```

0 comments on commit 1aceb59

Please sign in to comment.