Skip to content

Commit

Permalink
{RPaaS}{HDInsight}Try to fix warning in new hdi base rpaas master (#6186
Browse files Browse the repository at this point in the history
)

* Fix errors and some warning

* Fix Operation API missed example error

* Update readme.md and fix example error

* Update operation example type

* Fix Cody style error

* Add different language readme

* Fix python and go readme

* update readme.md

* Fix go readme error

Co-authored-by: Zhenyu Zhou <[email protected]>
  • Loading branch information
aim-for-better and Zhenyu Zhou authored Feb 22, 2022
1 parent 4d6c142 commit 0dc1e2d
Show file tree
Hide file tree
Showing 10 changed files with 218 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "resourceGroup1",
"api-version": "2021-09-15-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Microsoft.HDInsight/clusterpool/read",
"isDataAction": false,
"display": {
"provider": "HDInsight on AKS",
"resource": "Cluster Pool.",
"operation": "Get Cluster Pool Operation result.",
"description": "Get any cluster pool."
},
"origin": "user, system"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,11 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/serviceConfigs": {
"get": {
"operationId": "Clusters_GetServiceConfigs",
"description": "Gets the config dump of all services running in cluster.",
"operationId": "Clusters_ListServiceConfigs",
"description": "Lists the config dump of all services running in cluster.",
"x-ms-examples": {
"HDInsightClusterGetServiceConfigs": {
"$ref": "./examples/GetClusterServiceConfigs.json"
"$ref": "./examples/ListClusterServiceConfigs.json"
}
},
"parameters": [
Expand Down Expand Up @@ -577,8 +577,8 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/sessionClusters/{sessionClusterName}/serviceConfigs": {
"get": {
"operationId": "SessionClusters_GetServiceConfigs",
"description": "Gets the config dump of all services running in session cluster.",
"operationId": "SessionClusters_ListServiceConfigs",
"description": "Lists the config dump of all services running in session cluster.",
"x-ms-examples": {
"HDInsightSessionClusterGetServiceConfigs": {
"$ref": "./examples/GetSessionClusterServiceConfigs.json"
Expand Down Expand Up @@ -924,13 +924,13 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews": {
"get": {
"operationId": "Clusters_GetInstanceViews",
"operationId": "Clusters_ListInstanceViews",
"x-ms-examples": {
"HDInsightClusterGetInstanceViews": {
"$ref": "./examples/GetClusterInstanceViews.json"
"$ref": "./examples/ListClusterInstanceViews.json"
}
},
"description": "Gets the lists of instance views",
"description": "Lists the lists of instance views",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
Expand Down Expand Up @@ -1011,13 +1011,13 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/sessionClusters/{sessionClusterName}/instanceViews": {
"get": {
"operationId": "SessionClusters_GetInstanceViews",
"operationId": "SessionClusters_ListInstanceViews",
"x-ms-examples": {
"HDInsightSessionClusterGetInstanceViews": {
"$ref": "./examples/GetSessionClusterInstanceViews.json"
"$ref": "./examples/ListSessionClusterInstanceViews.json"
}
},
"description": "Gets the list of instance views",
"description": "Lists the list of instance views",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
Expand Down Expand Up @@ -1106,6 +1106,11 @@
"get": {
"description": "Returns list of operations.",
"operationId": "Operations_List",
"x-ms-examples": {
"ListOperations": {
"$ref": "./examples/GetOperations.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -1133,7 +1138,7 @@
"/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/clusterOfferingVersions": {
"get": {
"description": "Returns a list of cluster type versions.",
"operationId": "clusterOfferingVersions_ListByLocation",
"operationId": "ClusterOfferingVersions_ListByLocation",
"x-ms-examples": {
"ClusterTypeVersionListResult": {
"$ref": "./examples/ListClusterOfferingVersions.json"
Expand All @@ -1154,7 +1159,7 @@
"200": {
"description": "Clusters successfully returned.",
"schema": {
"$ref": "#/definitions/clusterOfferingVersionsListResult"
"$ref": "#/definitions/ClusterOfferingVersionsListResult"
}
},
"default": {
Expand Down Expand Up @@ -1476,7 +1481,8 @@
"description": "Properties of Key Vault secret.",
"items": {
"$ref": "#/definitions/ClusterSecretReference"
}
},
"x-ms-identifiers": []
}
}
},
Expand Down Expand Up @@ -1526,7 +1532,8 @@
"description": "List of Config Files.",
"items": {
"$ref": "#/definitions/ClusterConfigFile"
}
},
"x-ms-identifiers": []
}
}
},
Expand All @@ -1547,7 +1554,8 @@
"description": "List of service configs.",
"items": {
"$ref": "#/definitions/ClusterServiceConfig"
}
},
"x-ms-identifiers": []
}
}
},
Expand All @@ -1571,7 +1579,8 @@
"description": "List of SSH connectivity endpoints.",
"items": {
"$ref": "#/definitions/SshConnectivityEndpoint"
}
},
"x-ms-identifiers": []
}
},
"readOnly": true
Expand Down Expand Up @@ -1629,9 +1638,11 @@
},
"serviceConfigsProfiles": {
"type": "array",
"description": "The service configs profiles.",
"items": {
"$ref": "#/definitions/ClusterServiceConfigsProfile"
}
},
"x-ms-identifiers": []
},
"connectivityProfile": {
"$ref": "#/definitions/ConnectivityProfile"
Expand Down Expand Up @@ -1794,7 +1805,8 @@
"description": "Cluster/SessionCluster instance service config in the array.",
"items": {
"$ref": "#/definitions/ClusterInstanceServiceConfig"
}
},
"x-ms-identifiers": []
},
"nextLink": {
"type": "string",
Expand Down Expand Up @@ -1844,7 +1856,9 @@
"items": {
"$ref": "#/definitions/ClusterInstanceViewResult"
},
"type": "array"
"type": "array",
"description": "Cluster instance view array.",
"x-ms-identifiers": []
},
"nextLink": {
"description": "The link (url) to the next page of results.",
Expand All @@ -1868,6 +1882,7 @@
},
"properties": {
"description": "Properties of the instance view.",
"x-ms-client-flatten": true,
"allOf": [
{
"$ref": "#/definitions/ClusterInstanceViewProperties"
Expand All @@ -1878,6 +1893,7 @@
},
"ClusterInstanceViewProperties": {
"type": "object",
"description": "Cluster Instance View Properties.",
"required": [
"status",
"serviceStatuses"
Expand All @@ -1896,7 +1912,8 @@
"description": "List of statuses of relevant services that make up the hilo cluster to surface to the customer.",
"items": {
"$ref": "#/definitions/ServiceStatus"
}
},
"x-ms-identifiers": []
}
}
},
Expand All @@ -1908,13 +1925,16 @@
],
"properties": {
"ready": {
"type": "string"
"type": "string",
"description": "The cluster ready status"
},
"reason": {
"type": "string"
"type": "string",
"description": "The status reason."
},
"message": {
"type": "string"
"type": "string",
"description": "The additional message."
}
}
},
Expand Down Expand Up @@ -2044,16 +2064,17 @@
}
}
},
"clusterOfferingVersionsListResult": {
"ClusterOfferingVersionsListResult": {
"type": "object",
"description": "Represents a list of cluster type and stack version mappings.",
"properties": {
"value": {
"type": "array",
"description": "The cluster type and stack version mappings in the array.",
"items": {
"$ref": "#/definitions/clusterOfferingVersions"
}
"$ref": "#/definitions/ClusterOfferingVersions"
},
"x-ms-identifiers": []
},
"nextLink": {
"type": "string",
Expand All @@ -2062,7 +2083,7 @@
}
}
},
"clusterOfferingVersions": {
"ClusterOfferingVersions": {
"type": "object",
"description": "Cluster type and stack versions mapping.",
"properties": {
Expand All @@ -2073,11 +2094,11 @@
"properties": {
"x-ms-client-flatten": true,
"description": "Gets or sets the properties. Define cluster type versions properties.",
"$ref": "#/definitions/clusterOfferingVersionsProperties"
"$ref": "#/definitions/ClusterOfferingVersionsProperties"
}
}
},
"clusterOfferingVersionsProperties": {
"ClusterOfferingVersionsProperties": {
"type": "object",
"description": "ClusterTypeVersion internal properties.",
"properties": {
Expand Down
11 changes: 11 additions & 0 deletions specification/hdinsight/resource-manager/readme.go.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Go

These settings apply only when `--go` is specified on the command line.

``` yaml $(go) && $(track2)
license-header: MICROSOFT_MIT_NO_VERSION
module-name: sdk/resourcemanager/hdinsight/armhdinsightaks
module: github.com/Azure/azure-sdk-for-go/$(module-name)
output-folder: $(go-sdk-folder)/$(module-name)
azure-arm: true
```
36 changes: 36 additions & 0 deletions specification/hdinsight/resource-manager/readme.java.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Java

These settings apply only when `--java` is specified on the command line.
Please also specify `--azure-libraries-for-java-folder=<path to the root directory of your azure-libraries-for-java clone>`.

``` yaml $(java)
azure-arm: true
fluent: true
namespace: com.microsoft.azure.management.synapse
license-header: MICROSOFT_MIT_NO_CODEGEN
payload-flattening-threshold: 1
output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-hdinsight-aks

rename-model: 'SubResource:EntityResource'
```
### Java multi-api
``` yaml $(java) && $(multiapi)
batch:
- tag: package-2021-09-preview
```
### Tag: package-2021-09-preview and java
These settings apply only when `--tag=package-2021-09-preview --java` is specified on the command line.

Please also specify `--azure-libraries-for-java=<path to the root directory of your azure-sdk-for-java clone>`.

``` yaml $(tag) == 'package-2019-06-01-preview' && $(java) && $(multiapi)
java:
namespace: com.microsoft.azure.management.synapse.v2021_09_15_preview
output-folder: $(azure-libraries-for-java-folder)/sdk/hdinsight/aks/mgmt-v2019_06_01_preview
regenerate-manager: true
generate-interface: true
```
55 changes: 53 additions & 2 deletions specification/hdinsight/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ To see additional help and options, run:
These are the global settings for the HDInsight API.

``` yaml
title: HDInsightManagementClient
description: HDInsight Management Client
title: HDInsightAKSManagementClient
description: HDInsight AKS Management Client
openapi-type: arm
openapi-subtype: rpaas
azure-arm: true
Expand All @@ -41,6 +41,57 @@ input-file:
- Microsoft.HDInsight/preview/2021-09-15-preview/hdinsight.json
```

---

# Code Generation


## Swagger to SDK

This section describes what SDK should be generated by the automatic system.
This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net
- repo: azure-sdk-for-go-track2
- repo: azure-sdk-for-java
- repo: azure-sdk-for-python-track2
- repo: azure-sdk-for-js
- repo: azure-sdk-for-node
- repo: azure-resource-manager-schemas
```

## Python

See configuration in [readme.python.md](./readme.python.md)

## Go

See configuration in [readme.go.md](./readme.go.md)

## C#

These settings apply only when `--csharp` is specified on the command line.
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.

``` yaml $(csharp)
csharp:
license-header: MICROSOFT_MIT_NO_VERSION
namespace: Microsoft.Azure.Management.HDInsight.AKS
output-folder: $(csharp-sdks-folder)/hdinsight/Microsoft.Azure.Management.HDInsight.AKS/src/Generated
clear-output-folder: true
```

## Java

See configuration in [readme.java.md](./readme.java.md)

## Typescript

See configuration in [readme.typescript.md](./readme.typescript.md)


## AzureResourceSchema

See configuration in [readme.azureresourceschema.md](./readme.azureresourceschema.md)
Loading

0 comments on commit 0dc1e2d

Please sign in to comment.