зеркало из
1
0
Форкнуть 0
1 Generating Ruby SDK
mozehgir редактировал(а) эту страницу 2017-11-17 11:53:47 -08:00
Этот файл содержит неоднозначные символы Юникода!

Этот файл содержит неоднозначные символы Юникода, которые могут быть перепутаны с другими в текущей локали. Если это намеренно, можете спокойно проигнорировать это предупреждение. Используйте кнопку Экранировать, чтобы подсветить эти символы.

Generate Ruby SDK for local code generation validation

  1. Install AutoRest
  2. Call autorest with the following arguments:
  • If you have a readme.md file associated with the specification(s) youre generating an SDK for:
autorest path --ruby --azure-arm --output-folder  --package-version --package-name --namespace

Where these placeholders are replaced by the following:

path = path to the readme file
output-folder = path to where you want the generated code
package-version = gem version
package-name = name of the package ex. azure_mgmt_compute
namespace = namespace for your service ex. Azure::Compute::Mgmt::V2017_03_30

If you need to generate code for a specific tag from the readme.md file, you can also pass:

--tag (name of the tag to use) 
  • If youre looking to generate code based on a specific swagger file, you can replace path ro readme file with the path to the swagger file
path = --input-file (path to the swagger file)

Updates to existing specs already picked up in the Ruby SDK

  1. When an update is made to a spec in azure-rest-api-specs repo, thats already getting picked up by the Ruby SDK via:
    https://github.com/Azure/azure-sdk-for-ruby/blob/master/swagger_to_sdk_config.json
    A PR will get automatically created in azure-sdk-for-ruby repo with the corresponding changes.
  2. Feel free to comment on the PR
  3. The Ruby SDK will pick it up from here, if you need to merge the change as soon as possible, please comment on the PR and/or send email to Azure DevEx Ruby team.

New gem to be included in the Ruby SDK

Currently done by the Ruby SDK team. Send an email to Azure DevX Ruby team to request a new gem in the Ruby SDK.
Service teams can also do the process themselves if they choose to do so by following the instructions below:

  1. Create a PR against azure-sdk-for-ruby repo containing:

Building gems

  1. Use rake arm:build task to build gems for everything in:
    https://github.com/Azure/azure-sdk-for-ruby/blob/master/swagger_to_sdk_config.json
    Or
  2. Run rake build from your gems folder to build that individual gem.

Releasing to RubyGems

Please email Azure DevEx Ruby team to kick off a release.