Skip to content

Commit

Permalink
Microsoft.RecommendationsService new sdk generation (Azure#4549)
Browse files Browse the repository at this point in the history
* Add support for SDK generation on C#,azcli,az powershell

* Add missing yaml section

* Add missing link section

* Another try to change the readme.md to allow autorest to work

* Add all auto generated sdks

* Changed recommendationsservice into intelligentrecommendations, Since our servie name is really Intelligent Recommendations. The recommendations service is the service name according to the specifications, but this is old and if possible it better not be used

* Removed $(python) from the python yaml

* Add support for python track1

* Removed Track2 python sdk

* Add code gen section

* Updated the python to track2 pipeline

* Updated the Go SDK to use track2

* Updated the C# namespace to have Microsoft.Azure prefix

* Aligned all sdks to use recommendationsservice instead of intelligentrecommendations

* Fixed bad output folder name for C#. CHanged GeneratedProtocol into Generated
  • Loading branch information
yosal authored Mar 11, 2022
1 parent 29d5545 commit ce5fa9f
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 0 deletions.
28 changes: 28 additions & 0 deletions specification/recommendationsservice/resource-manager/readme.az.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## AZ

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

For new Resource Provider. It is highly recommended to onboard Azure CLI extensions. There's no differences in terms of customer usage.

``` yaml $(az) && $(target-mode) != 'core'
az:
extensions: recommendationsservice
namespace: azure.mgmt.recommendationsservice
package-name: azure-mgmt-recommendationsservice
az-output-folder: $(azure-cli-extension-folder)/src/recommendationsservice
python-sdk-output-folder: "$(az-output-folder)/azext_recommendationsservice/vendored_sdks/recommendationsservice"
# add additional configuration here specific for Azure CLI
# refer to the faq.md for more details
```



This is for command modules that already in azure cli main repo.
``` yaml $(az) && $(target-mode) == 'core'
az:
extensions: recommendationsservice
namespace: azure.mgmt.recommendationsservice
package-name: azure-mgmt-recommendationsservice
az-output-folder: $(azure-cli-folder)/src/azure-cli/azure/cli/command_modules/recommendationsservice
python-sdk-output-folder: "$(az-output-folder)/vendored_sdks/recommendationsservice"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
``` yaml
# add any configuration here for all CLI languages
# refer to the faq.md for more details
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## 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:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 1
clear-output-folder: true
client-side-validation: false
namespace: Microsoft.Azure.Management.RecommendationsService
output-folder: $(csharp-sdks-folder)/recommendationsservice/Microsoft.Azure.Management.RecommendationsService/Generated
```
11 changes: 11 additions & 0 deletions specification/recommendationsservice/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)
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
module-name: sdk/resourcemanager/recommendationsservice/armrecommendationsservice
module: github.com/Azure/azure-sdk-for-go/$(module-name)
output-folder: $(go-sdk-folder)/$(module-name)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## 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.recommendationsservice
license-header: MICROSOFT_MIT_NO_CODEGEN
payload-flattening-threshold: 1
output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-recommendationsservice
```
### Java multi-api
```yaml $(java) && $(multiapi)
batch:
- tag: package-2021-02-01-preview
```
### Tag: package-2021-02-01-preview and java
These settings apply only when `--tag=package-2021-02-01-preview --java` is specified on the command line.
Please also specify `--azure-libraries-for-java-folder=<path to the root directory of your azure-sdk-for-java clone>`.

``` yaml $(tag) == 'package-2021-02-01-preview' && $(java) && $(multiapi)
java:
namespace: com.microsoft.azure.management.recommendationsservice.v2021_02_01_preview
output-folder: $(azure-libraries-for-java-folder)/sdk/recommendationsservice/mgmt-2021_02_01_preview
regenerate-manager: true
generate-interface: true
```
31 changes: 31 additions & 0 deletions specification/recommendationsservice/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ openapi-subtype: rpaas
tag: package-2021-02-01-preview
```
### Tag: package-2021-02-01-preview
These settings apply only when `--tag=package-2021-02-01-preview` is specified on the command line.
Expand All @@ -40,3 +41,33 @@ input-file:
```

---

# 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-go-track2
- repo: azure-sdk-for-java
- repo: azure-sdk-for-js
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python-track2
- repo: azure-cli-extensions
```

## CSharp
See configuration in [readme.csharp.md](./readme.csharp.md)
## Cli
See configuration in [readme.cli.md](./readme.cli.md)
## Az
See configuration in [readme.az.md](./readme.az.md)
## Go
See configuration in [readme.go.md](./readme.go.md)
## Java
See configuration in [readme.java.md](./readme.java.md)
## TypeScript
See configuration in [readme.typescript.md](./readme.typescript.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Python

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

``` yaml $(track2)
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
package-name: azure-mgmt-recommendationsservice
no-namespace-folders: true
package-version: 1.0.0b1
clear-output-folder: true
```
``` yaml $(python-mode) == 'update' && $(track2)
no-namespace-folders: true
output-folder: $(python-sdks-folder)/recommendationsservice/azure-mgmt-recommendationsservice/azure/mgmt/recommendationsservice
```
``` yaml $(python-mode) == 'create' && $(track2)
basic-setup-py: true
output-folder: $(python-sdks-folder)/recommendationsservice/azure-mgmt-recommendationsservice
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## TypeScript

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

``` yaml $(typescript)
typescript:
azure-arm: true
package-name: "@azure/arm-recommendationsservice"
output-folder: "$(typescript-sdks-folder)/sdk/recommendationsservice/arm-recommendationsservice"
payload-flattening-threshold: 1
clear-output-folder: true
generate-metadata: true
```

0 comments on commit ce5fa9f

Please sign in to comment.