Skip to content

Commit a7e3598

Browse files
authored
Modify Swagger to fix the problem of automatically generating ugly names in track 2 (#14758)
* update swagger to fix track 2 autogenerated naming issue * fix * update readme for sdk generation * fix lint error * Trigger Build * update readme
1 parent 0ddc408 commit a7e3598

File tree

5 files changed

+65
-19
lines changed

5 files changed

+65
-19
lines changed

specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3129,24 +3129,20 @@
31293129
"extendedLocation": {
31303130
"$ref": "#/definitions/ExtendedLocation",
31313131
"description": "The extended location of the Virtual Machine."
3132+
},
3133+
"identity": {
3134+
"$ref": "#/definitions/ManagedClusterIdentity",
3135+
"description": "The identity of the managed cluster, if configured."
3136+
},
3137+
"properties": {
3138+
"description": "Properties of a managed cluster.",
3139+
"$ref": "#/definitions/ManagedClusterProperties",
3140+
"x-ms-client-flatten": true
31323141
}
31333142
},
31343143
"allOf": [
31353144
{
31363145
"$ref": "#/definitions/Resource"
3137-
},
3138-
{
3139-
"properties": {
3140-
"properties": {
3141-
"description": "Properties of a managed cluster.",
3142-
"$ref": "#/definitions/ManagedClusterProperties",
3143-
"x-ms-client-flatten": true
3144-
},
3145-
"identity": {
3146-
"$ref": "#/definitions/ManagedClusterIdentity",
3147-
"description": "The identity of the managed cluster, if configured."
3148-
}
3149-
}
31503146
}
31513147
],
31523148
"description": "Managed cluster."
@@ -3326,11 +3322,7 @@
33263322
},
33273323
"identityProfile": {
33283324
"additionalProperties": {
3329-
"allOf": [
3330-
{
3331-
"$ref": "#/definitions/UserAssignedIdentity"
3332-
}
3333-
]
3325+
"$ref": "#/definitions/UserAssignedIdentity"
33343326
},
33353327
"description": "Identities associated with the cluster."
33363328
},
@@ -3422,6 +3414,7 @@
34223414
"type": "object",
34233415
"additionalProperties": {
34243416
"type": "object",
3417+
"x-ms-client-name": "ManagedServiceIdentityUserAssignedIdentitiesValue",
34253418
"properties": {
34263419
"principalId": {
34273420
"readOnly": true,

specification/containerservice/resource-manager/readme.go.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ azure-arm: true
2020
2121
``` yaml $(go) && $(multiapi)
2222
batch:
23+
- tag: package-2021-07
2324
- tag: package-2021-05
2425
- tag: package-2021-03
2526
- tag: package-2021-02
@@ -48,6 +49,15 @@ batch:
4849
- tag: package-2017-07
4950
```
5051
52+
### Tag: package-2021-07 and go
53+
54+
These settings apply only when `--package-2021-07 --go` is specified on the command line.
55+
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.
56+
57+
``` yaml $(tag)=='package-2021-07' && $(go)
58+
namespace: containerservice
59+
output-folder: $(go-sdk-folder)/services/$(namespace)/mgmt/2021-07-01/$(namespace)
60+
```
5161
### Tag: package-2021-05 and go
5262

5363
These settings apply only when `--package-2021-05 --go` is specified on the command line.

specification/containerservice/resource-manager/readme.java.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ batch:
3737
- tag: package-2021-02
3838
- tag: package-2021-03
3939
- tag: package-2021-05
40+
- tag: package-2021-07
41+
```
42+
43+
### Tag: package-2021-07 and java
44+
45+
These settings apply only when `--tag=package-2021-07` is specified on the command line.
46+
Please also specify `--azure-libraries-for-java-folder=<path to the root directory of your azure-sdk-for-java clone>`.
47+
48+
``` yaml $(tag) == 'package-2021-05' && $(java) && $(multiapi)
49+
java:
50+
namespace: com.microsoft.azure.management.containerservice.v2021_07_01
51+
output-folder: $(azure-libraries-for-java-folder)/sdk/containerservice/mgmt-v2021_07_01
52+
regenerate-manager: true
53+
generate-interface: true
4054
```
4155

4256
### Tag: package-2021-05 and java

specification/containerservice/resource-manager/readme.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ tag: package-2021-07
4242
4343
These settings apply only when `--tag=package-2021-07` is specified on the command line.
4444

45-
```yaml $(tag) == 'package-2021-07'
45+
``` yaml $(tag) == 'package-2021-07'
4646
input-file:
4747
- Microsoft.ContainerService/stable/2021-07-01/managedClusters.json
4848
```
49+
4950
### Tag: package-2021-05
5051

5152
These settings apply only when `--tag=package-2021-05` is specified on the command line.
@@ -337,6 +338,19 @@ input-file:
337338
338339
```
339340

341+
### Tag: package-2021-07-01-only
342+
343+
These settings apply only when `--tag=package-2021-07-01-only` is specified on the command line.
344+
345+
``` yaml $(tag) == 'package-2021-07-01-only'
346+
input-file:
347+
- Microsoft.ContainerService/stable/2021-07-01/managedClusters.json
348+
directive:
349+
- suppress: DefinitionsPropertiesNamesCamelCase
350+
where: $.definitions.ManagedClusterProperties.properties.autoScalerProfile
351+
reason: Cluster-autoscaler settings are not camel-cased
352+
```
353+
340354
### Tag: package-2021-05-01-only
341355

342356
These settings apply only when `--tag=package-2021-05-01-only` is specified on the command line.

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Generate all API versions currently shipped for this package
2626
2727
```yaml $(python) && $(multiapi) && !$(track2)
2828
batch:
29+
- tag: package-2021-07-01-only
2930
- tag: package-2021-05-01-only
3031
- tag: package-2021-03-01-only
3132
- tag: package-2021-02-01-only
@@ -55,6 +56,7 @@ batch:
5556
5657
```yaml $(python) && $(multiapi) && $(track2)
5758
batch:
59+
- tag: package-2021-07-01-only
5860
- tag: package-2021-05-01-only
5961
- tag: package-2021-03-01-only
6062
- tag: package-2021-02-01-only
@@ -89,6 +91,19 @@ clear-output-folder: false
8991
perform-load: false
9092
```
9193
94+
### Tag: package-2021-07-01-only and python
95+
96+
These settings apply only when `--tag=package-2021-07-01-only --python` is specified on the command line.
97+
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
98+
99+
``` yaml $(tag) == 'package-2021-05-01-only' && $(python)
100+
python:
101+
namespace: azure.mgmt.containerservice.v2021_07_01
102+
output-folder: $(python-sdks-folder)/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01
103+
namespace: azure.mgmt.containerservice.v2021_07_01
104+
output-folder: $(python-sdks-folder)/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_07_01
105+
```
106+
92107
### Tag: package-2021-05-01-only and python
93108

94109
These settings apply only when `--tag=package-2021-05-01-only --python` is specified on the command line.

0 commit comments

Comments
 (0)