GithubHelp home page GithubHelp logo

chgeuer / ex_microsoft_azure_management_generator Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 27 KB

Generates Elixir SDKs from Microsoft Azure Swagger specifications.

License: Apache License 2.0

Elixir 89.74% Shell 9.46% Batchfile 0.80%
elixir elixir-lang elixir-client elixir-library azure azure-resource-manager

ex_microsoft_azure_management_generator's Introduction

ExMicrosoftAzureManagementGenerator

Generates Elixir SDKs from Microsoft Azure Swagger specifications.

Download

Available on hex.pm and GitHub.

Support

This is not an official SDK from the Microsoft Azure team, but a generator by an Elixir noob.

Maturity

The code generated by this tool is not yet 100% checked. I have been able to GET information from the Azure Resource Manager API, as well as making deployments (PUT). For examples, please see the chgeuer/ex_microsoft_azure_management_samples repository.

Dependencies

  • Java must be installed

How to run

Do a mix deps.get (obviously) and simply call ./generate.sh on Linux or .\generate.cmd on Windows. This will read the swagger.json file, pull the mentioned Swagger 2.0 definitions from the Azure Swagger specifications repo, and build the clients. Check the config section for details.

Configuration

The example configuration in swagger.json below generates two SDKs, one for the Azure Compute provider, and one for the PostgreSQL managed database.

The compute SDK joins multiple Swagger definitions (skus, compute, runCommands and disk) in a single Elixir SDK.

[
    { 
        "app_name": "ex_microsoft_azure_management_compute",
        "package": "Microsoft.Azure.Management.Compute", 
        "name": "Microsoft.Azure.Management.Compute", 
        "url": [
            "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/compute/resource-manager/Microsoft.Compute/stable/2017-09-01/skus.json",
            "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/compute/resource-manager/Microsoft.Compute/stable/2017-12-01/compute.json",
            "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/compute/resource-manager/Microsoft.Compute/stable/2017-12-01/runCommands.json",
            "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/disk.json"
         ]
    },
    { 
        "app_name": "ex_microsoft_azure_management_postgresql",
        "package": "Microsoft.Azure.Management.Database.PostgreSql", 
        "name": "Microsoft.Azure.Management.Database.PostgreSql", 
        "url": [ 
            "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json"
         ]
    },
    ...
]

notes

REM https://openapi-generator.tech/docs/customization

java -jar C:\github\openapitools\openapi-generator\modules\openapi-generator-cli\target\openapi-generator-cli.jar help generate

ex_microsoft_azure_management_generator's People

Contributors

chgeuer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

onixus74

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.