-
Notifications
You must be signed in to change notification settings - Fork 2k
[Management] OpenAPI specs
In PR on azure-rest-api-specs or azure-rest-api-specs-pr, it is easy to enable the automation for management SDK.
As resource provider, one only need to ensure - repo: azure-sdk-for-java
is added to swagger-to-sdk
yaml section in readme.md, so that Java SDK automation is enabled. Here is the sample readme.md.
Reference
A Python script in Azure SDK for Java can help generate a management SDK from OpenAPI specs.
Please see Working with AutoRest for the installation of autorest
CLI. It also requires the installation of Node.js 16 or above, Java 11 or above, and Python 3.
Python package PyYAML
and requests
is required to be installed, e.g. via pip3 install --upgrade PyYAML requests
.
As an example, if the spec is resourcegraph, one can call below command line to generate Java management SDK for it.
python eng/mgmt/automation/generate.py --readme=resourcegraph
This will generate or update the SDK under sdk/resourcegraph/azure-resourcemanager-resourcegraph
.
--tag
option can be used if one wish to use a specific tag in spec readme.
There is an internal pipeline java - lite generation - mgmt
, which calls the above Python script and create pull request of the generated SDK.
It takes similar input parameters as the script, e.g. README
variable for readme
option, TAG
variable for tag
option.
- Frequently Asked Questions
- Azure Identity Examples
- Configuration
- Performance Tuning
- Android Support
- Unit Testing
- Test Proxy Migration
- Azure Json Migration
- New Checkstyle and Spotbugs pattern migration
- Protocol Methods
- TypeSpec-Java Quickstart
- Getting Started Guidance
- Adding a Module
- Building
- Writing Performance Tests
- Working with AutoRest
- Deprecation
- BOM guidelines
- Release process
- Access helpers