You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: eng/common/instructions/azsdk-tools/typespec-to-sdk.instructions.md
+24-3Lines changed: 24 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,28 @@ Pre-requisites:
17
17
# SDK generation steps
18
18
19
19
## Step: Generate SDKs
20
-
**Goal**: Generate SDKs
21
-
**Message to user**: "SDK generation will take approximately 15-20 minutes. Currently, SDKs are generated using the Azure DevOps pipeline. SDK generation is supported only from a merged API spec or from an API spec pull request in the https://github.com/Azure/azure-rest-api-specs repository."
20
+
21
+
As a first step, you must prompt the user to understand the intention of SDK generation. Based on the user input, you can either run SDK generation locally or use SDK generation pipeline.
22
+
23
+
Generate SDK locally in cases below:
24
+
- If the user wants to walk through each SDK generation step locally. This approach requires user to have the setup for each language to generate SDK locally. User can create a pull request for each language after completing all the steps in SDK generation successfully to get the generated SDK reviewed and merged.
25
+
- If SDK or client.tsp customizations are needed before creating a pull request.
26
+
- If the user wants to add tests, samples or any customization to the generated SDK.
27
+
28
+
Generate SDK using pipeline:
29
+
- If the user wants to generate SDK and get a PR automatically created in Azure SDK language repositories. This approach can be followed if the user does not want to setup local environment for each language.
30
+
31
+
### Generate SDK locally:
32
+
33
+
**Condition**: If user chooses to generate SDK locally
34
+
**Message to user**: "Generating SDKs locally requires you to have the development environment set up for each language. Prompt the user to create a pull request for each language after completing the following steps successfully: generation, validation, build, test and update of metadata, change log, and version."
35
+
**Actions**:
36
+
Follow the steps in #file:local-sdk-workflow.instructions.md to generate and build SDKs locally from TypeSpec project.
37
+
38
+
### Generate SDK using pipeline:
39
+
40
+
**Condition**: If user chooses to generate the SDK using pipeline or when generating SDK by GitHub coding agent
41
+
**Message to user**: "SDK generation will take approximately 15-20 minutes. SDKs are generated using the Azure DevOps pipeline. SDK generation is supported only from a merged API spec or from an API spec pull request in the https://github.com/Azure/azure-rest-api-specs repository."
22
42
**Actions**:
23
43
1. Identify whether TypeSpec is for Management Plane or Data Plane based on project structure and files. tspconfig.yaml file contains `resource-manager` for management plane and `data-plane` for data plane as resource provider.
24
44
- Execute the SDK generation pipeline with the following required parameters for all languages:
@@ -33,7 +53,8 @@ Pre-requisites:
33
53
2. Monitor pipeline status after 15 minutes and provide updates. If pipeline is in progress, inform user that it may take additional time and check the status later.
34
54
3. Display generated SDK PR links when available. If pipeline fails, inform user with error details and suggest to check pipeline logs for more information.
35
55
4. If SDK pull request is available for all languages, ask user to review generated SDK pull request and mark them as ready for review when they are ready to get them reviewed and merged.
36
-
5. If SDK pull request was created for test purposes, inform user to close the test SDK pull request.
56
+
5. Inform the user that they can checkout generated SDK pull request locally and add more tests, samples or code customizations if needed using local SDK generation tools.
57
+
6. If SDK pull request was created for test purposes, inform user to close the test SDK pull request.
37
58
**Success Criteria**: SDK generation pipeline initiated and SDKs generated
0 commit comments