Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chgeuer/ex_microsoft_azure_management_generator
Generates Elixir SDKs from Microsoft Azure Swagger specifications.
https://github.com/chgeuer/ex_microsoft_azure_management_generator
azure azure-resource-manager elixir elixir-client elixir-lang elixir-library
Last synced: 3 months ago
JSON representation
Generates Elixir SDKs from Microsoft Azure Swagger specifications.
- Host: GitHub
- URL: https://github.com/chgeuer/ex_microsoft_azure_management_generator
- Owner: chgeuer
- License: apache-2.0
- Created: 2018-05-03T09:54:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-07T10:54:36.000Z (about 5 years ago)
- Last Synced: 2024-03-15T07:06:16.701Z (11 months ago)
- Topics: azure, azure-resource-manager, elixir, elixir-client, elixir-lang, elixir-library
- Language: Elixir
- Homepage:
- Size: 26.4 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ExMicrosoftAzureManagementGenerator
Generates Elixir SDKs from Microsoft Azure Swagger specifications.
## Download
Available on [hex.pm](https://hex.pm/packages/ex_microsoft_azure_management_generator) and [GitHub](https://github.com/chgeuer/ex_microsoft_azure_management_generator).
## 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](https://github.com/chgeuer/ex_microsoft_azure_management_samples/blob/master/lib/sample.ex) 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](#configuration) 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.
```json
[
{
"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
```cmd
REM https://openapi-generator.tech/docs/customizationjava -jar C:\github\openapitools\openapi-generator\modules\openapi-generator-cli\target\openapi-generator-cli.jar help generate
```