forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Azure#37 from Lusitanian/feature/regen_readme
Add documentation for regen script
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Regenerating SDK | ||
|
||
The code in the azure-keyvault package is generated via AutoREST. After code generation, there are currently several manual modifications that need to be made for the build to succeed. In the root of the azure-keyvault-java repo, there is a Python script called "regenerate_and_fix_sdk.py" which will automatically regenerate the code and apply the necessary fixes. To regenerate the code using this script: | ||
|
||
- Install AutoREST: https://github.com/Azure/autorest/blob/master/docs/installing-autorest.md | ||
- Open the script in your favorite editor and change "swagger_source_branch" to contain the branch of the Azure REST spec API repo that you'd like the API spec to be sourced from – likely either "master" or "keyvault_preview" | ||
- If there is a tag you'd like to pass to AutoREST – set the "autorest_tag" branch accordingly. | ||
- Using Python 3.6+, run the script from the root of the checked out repository. Verify that no errors appear, and then build/test the SDK. | ||
|
||
|
||
|
||
The changes made by the script post-regeneration are as follows: | ||
|
||
* The generated webkey models will be removed | ||
|
||
|
||
* Any generated model class which has a corresponding custom class in the "models/custom" folder will be changed to inherit from the custom class. | ||
* Any class which utilizes webkey models will have the correct imports from the azure-keyvault-webkey package added | ||
* AutoREST occasionally generates broken parameter declarations in the Javadoc comments - these are repaired. |