Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Azure Stack API Steps to regenerate SDKs

Sarangan Rajamanickam edited this page Aug 4, 2017 · 4 revisions

Phase I: Setting up Specs Repository

Step 1: Clone the Specs repository

Use the following command to clone the specs repository:

git clone https://github.com/Azure/azure-rest-api-specs.git
git checkout current

Step 2: Setup the configuration file

If you would like to (re)generate the azure_mgmt_compute, then open the readme.md file in <YOUR_SPECS_REPOSITORY_CLONED_PATH>/specification/compute/resource-manager/ path and add a new tag such as:

``` yaml $(tag) == '<YOUR_TAG_NAME>'
input-file:
- Microsoft.Compute/2017-03-30/compute.json
- Microsoft.Compute/2017-03-30/disk.json
- Microsoft.Compute/2017-03-30/runCommands.json
- Microsoft.ContainerService/2017-01-31/containerService.json

<YOUR_TAG_NAME> could be something similar to package-compute-2017-03.This tag name will be used to generate the Ruby SDK.

Phase II: Generating the SDK

Step 1: Install Autorest

Use the following command to install autorest:

npm install -g autorest

Step 2: Clone the Ruby SDK

Use the following command to clone Ruby SDK:

git clone https://github.com/Azure/azure-sdk-for-ruby.git 

Step 3: Delete the generated folder of the required SDK

If you would like to (re)generate the azure_mgmt_compute, then open <YOUR_AZURE_RUBY_SDK_CLONED_PATH>/management/azure_mgmt_compute/lib folder and delete the ‘generated’ folder.

Step 4: Generate the SDK

If you would like to (re)generate the azure_mgmt_compute, then you can use the following command:

autorest <YOUR_SPECS_REPOSITORY_CLONED_PATH>/current/specification/compute/resource-manager/readme.md --package-version=<YOUR_PACKAGE_VERSION> --namespace=Azure::ARM::Compute --package-name=azure_mgmt_compute --output-folder=<YOUR_AZURE_RUBY_SDK_CLONED_PATH>/ management/azure_mgmt_compute/lib --ruby --azure-arm –tag=<YOUR_TAG_NAME>

Additional Information