Skip to content

Commit 54c1039

Browse files
guy-microsoftjosuh
authored andcommitted
Required changes for Azure HealthBot swagger (Azure#12124)
* 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.
1 parent e2e4e9d commit 54c1039

File tree

8 files changed

+59
-137
lines changed

8 files changed

+59
-137
lines changed

specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/CheckNameAvailability.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/healthbot.json

Lines changed: 12 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -37,48 +37,6 @@
3737
}
3838
},
3939
"paths": {
40-
"/subscriptions/{subscriptionId}/providers/Microsoft.HealthBot/checkNameAvailability": {
41-
"post": {
42-
"description": "Check whether a bot name is available.",
43-
"operationId": "Bots_CheckNameAvailability",
44-
"x-ms-examples": {
45-
"check Name Availability": {
46-
"$ref": "./examples/CheckNameAvailability.json"
47-
}
48-
},
49-
"parameters": [
50-
{
51-
"name": "parameters",
52-
"in": "body",
53-
"required": true,
54-
"schema": {
55-
"$ref": "#/definitions/CheckNameAvailabilityRequestBody"
56-
},
57-
"description": "The request body parameters to provide for the check name availability request"
58-
},
59-
{
60-
"$ref": "#/parameters/subscriptionIdParameter"
61-
},
62-
{
63-
"$ref": "#/parameters/apiVersionParameter"
64-
}
65-
],
66-
"responses": {
67-
"200": {
68-
"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.",
69-
"schema": {
70-
"$ref": "#/definitions/CheckNameAvailabilityResponseBody"
71-
}
72-
},
73-
"default": {
74-
"description": "Error response describing why the operation failed",
75-
"schema": {
76-
"$ref": "#/definitions/Error"
77-
}
78-
}
79-
}
80-
}
81-
},
8240
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}": {
8341
"put": {
8442
"operationId": "Bots_Create",
@@ -87,7 +45,7 @@
8745
"$ref": "./examples/ResourceCreationPut.json"
8846
}
8947
},
90-
"description": "Create a new Healthcare Bot.",
48+
"description": "Create a new HealthBot.",
9149
"parameters": [
9250
{
9351
"$ref": "#/parameters/subscriptionIdParameter"
@@ -143,7 +101,7 @@
143101
"$ref": "./examples/ResourceInfoGet.json"
144102
}
145103
},
146-
"description": "Get a Healthcare Bot.",
104+
"description": "Get a HealthBot.",
147105
"parameters": [
148106
{
149107
"$ref": "#/parameters/subscriptionIdParameter"
@@ -180,7 +138,7 @@
180138
"$ref": "./examples/ResourceUpdatePatch.json"
181139
}
182140
},
183-
"description": "Patch a Healthcare Bot.",
141+
"description": "Patch a HealthBot.",
184142
"parameters": [
185143
{
186144
"$ref": "#/parameters/subscriptionIdParameter"
@@ -232,7 +190,7 @@
232190
"$ref": "./examples/ResourceDeletionDelete.json"
233191
}
234192
},
235-
"description": "Delete a Healthcare Bot.",
193+
"description": "Delete a HealthBot.",
236194
"parameters": [
237195
{
238196
"$ref": "#/parameters/subscriptionIdParameter"
@@ -395,73 +353,12 @@
395353
"name": "SkuName",
396354
"modelAsString": false
397355
}
398-
},
399-
"tier": {
400-
"type": "string",
401-
"enum": [
402-
"Free",
403-
"Standard"
404-
],
405-
"x-ms-enum": {
406-
"name": "SkuTier",
407-
"modelAsString": false
408-
},
409-
"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."
410-
},
411-
"size": {
412-
"type": "string",
413-
"description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. "
414-
},
415-
"family": {
416-
"type": "string",
417-
"description": "If the service has different generations of hardware, for the same SKU, then that can be captured here."
418-
},
419-
"capacity": {
420-
"type": "integer",
421-
"format": "int32",
422-
"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."
423356
}
424357
},
425358
"required": [
426359
"name"
427360
]
428361
},
429-
"CheckNameAvailabilityRequestBody": {
430-
"description": "The request body for a request to to check availability of a bot name.",
431-
"type": "object",
432-
"properties": {
433-
"name": {
434-
"description": "the name of the bot for which availability needs to be checked.",
435-
"type": "string"
436-
},
437-
"type": {
438-
"description": "the type of the bot for which availability needs to be checked",
439-
"type": "string"
440-
}
441-
},
442-
"required": [
443-
"name",
444-
"type"
445-
]
446-
},
447-
"CheckNameAvailabilityResponseBody": {
448-
"description": "The response body returned for a request to check availability of a bot name.",
449-
"type": "object",
450-
"properties": {
451-
"nameAvailable": {
452-
"description": "indicates if the bot name is valid and available.",
453-
"type": "boolean"
454-
},
455-
"reason": {
456-
"description": "Reason for the result",
457-
"type": "string"
458-
},
459-
"message": {
460-
"description": "additional message from server",
461-
"type": "string"
462-
}
463-
}
464-
},
465362
"Resource": {
466363
"description": "The resource model definition for a ARM tracked top level resource",
467364
"x-ms-azure-resource": true,
@@ -536,17 +433,20 @@
536433
},
537434
"properties": {
538435
"$ref": "#/definitions/HealthBotProperties",
539-
"description": "The set of properties specific to healthcare bot resource."
436+
"description": "The set of properties specific to Healthbot resource."
540437
}
541-
}
438+
},
439+
"required": [
440+
"sku"
441+
]
542442
},
543443
"HealthBotProperties": {
544444
"title": "HealthBotProperties",
545445
"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.",
546446
"properties": {
547447
"provisioningState": {
548448
"type": "string",
549-
"description": "The provisioning state of the Healthcare bot resource.",
449+
"description": "The provisioning state of the Healthbot resource.",
550450
"readOnly": true
551451
},
552452
"botManagementPortalLink": {
@@ -771,10 +671,10 @@
771671
"items": {
772672
"$ref": "#/definitions/HealthBot"
773673
},
774-
"description": "Gets the list of healthcare bot results and their properties."
674+
"description": "Gets the list of Healthbot results and their properties."
775675
}
776676
},
777-
"description": "The list of healthcare bot operation response."
677+
"description": "The list of Healthbot operation response."
778678
}
779679
},
780680
"parameters": {

specification/healthbot/resource-manager/readme.az.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,12 @@ az:
1010
az-output-folder: $(azure-cli-extension-folder)/src/healthbot
1111
python-sdk-output-folder: "$(az-output-folder)/azext_healthbot/vendored_sdks/healthbot"
1212
```
13+
14+
``` yaml
15+
directive:
16+
- where:
17+
group: healthbot bot
18+
set:
19+
group: healthbot
20+
21+
```

specification/healthbot/resource-manager/readme.csharp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ csharp:
1010
payload-flattening-threshold: 1
1111
clear-output-folder: true
1212
client-side-validation: false
13-
namespace: Microsoft.HealthBot
14-
output-folder: $(csharp-sdks-folder)/healthbot/management/Microsoft.HealthBot/GeneratedProtocol
13+
namespace: Microsoft.Azure.Management.Healthbot
14+
output-folder: $(csharp-sdks-folder)/healthbot/management/Microsoft.Azure.Management.Healthbot/src/Generated
1515
```
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Go
2+
3+
These settings apply only when `--go` is specified on the command line.
4+
5+
``` yaml $(go)
6+
go:
7+
license-header: MICROSOFT_APACHE_NO_VERSION
8+
clear-output-folder: true
9+
namespace: healthbot
10+
```
11+
12+
### Go multi-api
13+
14+
``` yaml $(go) && $(multiapi)
15+
batch:
16+
- tag: package-2020-12-08
17+
```
18+
19+
### Tag: package-2020-12-08 and go
20+
21+
These settings apply only when `--tag=package-2020-12-08 --go` is specified on the command line.
22+
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.
23+
24+
``` yaml $(tag)=='package-2020-12-08' && $(go)
25+
output-folder: $(go-sdk-folder)/services/$(namespace)/mgmt/2020-12-08/$(namespace)
26+
```

specification/healthbot/resource-manager/readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ swagger-to-sdk:
8888
- repo: azure-sdk-for-java
8989
- repo: azure-sdk-for-js
9090
- repo: azure-sdk-for-ruby
91+
- repo: azure-sdk-for-go
9192
after_scripts:
9293
- bundle install && rake arm:regen_all_profiles['azure_mgmt_healthbot']
9394
- repo: azure-cli-extensions
@@ -108,3 +109,7 @@ See configuration in [readme.typescript.md](./readme.typescript.md)
108109
## CSharp
109110

110111
See configuration in [readme.csharp.md](./readme.csharp.md)
112+
113+
## GO
114+
115+
See configuration in [readme.go.md](./readme.go.md)

specification/healthbot/resource-manager/readme.python.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ python:
88
azure-arm: true
99
license-header: MICROSOFT_MIT_NO_VERSION
1010
payload-flattening-threshold: 2
11-
namespace: Microsoft.HealthBot
12-
package-name: healthbot
11+
namespace: azure.mgmt.healthbot
12+
package-name: azure-mgmt-healthbot
1313
package-version: 2020-10-20-preview
1414
clear-output-folder: true
1515
```
1616
1717
```yaml $(python)
1818
python:
1919
no-namespace-folders: true
20-
output-folder: $(python-sdks-folder)/azure-mgmt/healthbot
20+
output-folder: $(python-sdks-folder)/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot
2121
```

specification/healthbot/resource-manager/readme.typescript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Please also specify `--typescript-sdks-folder=<path to root folder of your azure
66
```yaml $(typescript)
77
typescript:
88
azure-arm: true
9-
package-name: "healthbot"
10-
output-folder: "$(typescript-sdks-folder)/packages/healthbot"
9+
package-name: "@azure/arm-healthbot"
10+
output-folder: "$(typescript-sdks-folder)/sdk/healthbot/arm-healthbot"
1111
payload-flattening-threshold: 1
1212
generate-metadata: true
1313
```

0 commit comments

Comments
 (0)