|
12 | 12 |
|
13 | 13 | # Instructions |
14 | 14 |
|
15 | | -## Stage 1: Fuzzy selection and autorest inputs (reduced user input) |
16 | | -- Ask the user for only the approximate Azure service/module name (e.g., "hybrid connectivity"). |
17 | | -- Call the MCP tool "list-spec-modules" to fetch all service folders from azure-rest-api-specs/specification. |
18 | | -- Fuzzily match the user's input to the closest service name. Show top 3 matches and ask the user to confirm the service folder to use. |
19 | | -- Call the MCP tool "list-providers" with the chosen service to retrieve provider namespaces. If multiple providers are returned, ask the user to pick one; if only one, select it automatically. |
20 | | -- Ask the user what they want to call the PowerShell module title/service-name (e.g., HybridConnectivity). This is the display/module name, not the spec folder name. |
21 | | -- Call the MCP tool "list-api-versions" with service and provider to get available versions, separated by Stable and Preview. Ask the user to choose stability (stable/preview) and a specific API version. |
22 | | -- Call the MCP tool "resolve-autorest-inputs" with service, provider, stability, and version to compute the 4 inputs: serviceName, commitId, serviceSpecs, swaggerFileSpecs. |
| 15 | +## Stage 1: Interactive spec selection and autorest resolution |
| 16 | +- Ask the user for their desired **PowerShell module name** (e.g., "HybridConnectivity") |
| 17 | +- Call the MCP tool "list-spec-modules" to fetch all available specification folders from azure-rest-api-specs/specification. |
| 18 | +- From the full list, present 10 most relevant spec options to the user based on their PowerShell module name, or show a representative sample if no clear match. |
| 19 | +- Ask the user to choose which specification they want to use from the presented options, or ask if they want to see more options. |
| 20 | +- **Confirm the spec choice**: Once user selects a spec, ask them to confirm this is the correct specification for their needs (show the spec name clearly). |
| 21 | +- Call the MCP tool "list-providers" with the chosen spec folder to retrieve available provider namespaces. |
| 22 | +- Present the list of providers to the user: |
| 23 | + - If multiple providers are returned, ask the user to pick one |
| 24 | + - If only one provider exists, select it automatically but confirm with the user |
| 25 | +- **Confirm the provider choice**: Ask the user to confirm this is the correct provider namespace. |
| 26 | +- Call the MCP tool "list-api-versions" with the chosen spec folder and provider to get available versions, separated by Stable and Preview. |
| 27 | +- Present the API version options to the user and ask them to choose: |
| 28 | + 1. **Stability**: stable or preview |
| 29 | + 2. **API version**: specific version from the available list |
| 30 | +- **Confirm the API version choice**: Ask the user to confirm their stability and version selection. |
| 31 | +- Call the MCP tool "resolve-autorest-inputs" with the chosen spec folder, provider, stability, and version to compute the 4 autorest inputs: serviceName, commitId, serviceSpecs, swaggerFileSpecs. |
23 | 32 | - Store the resolved values for later steps (README generation and Autorest). Mark Stage 1 complete. |
24 | 33 |
|
25 | 34 | ## Stage 2: Generating partner powershell module |
26 | 35 | - FOLLOW ALL THE STEPS. DO NOT SKIP ANY STEPS. |
27 | 36 | - Navigate to the `src` folder in the home "azure-powershell" directory. |
28 | | -- Create a new folder named <serviceName> and within it a new folder named `<serviceName>.Autorest`. (If not already present) |
29 | | -- Move into the new folder `<serviceName>/<serviceName>.Autorest`, using the command `cd <serviceName>/<serviceName>.Autorest`. |
| 37 | +- Create a new folder named <PowerShell module name> and within it a new folder named `<PowerShell module name>.Autorest`. (If not already present) |
| 38 | +- Move into the new folder `<PowerShell module name>/<PowerShell module name>.Autorest`, using the command `cd <PowerShell module name>/<PowerShell module name>.Autorest`. |
30 | 39 | - Create a new file `README.md`. (If not already present) |
31 | 40 | - Add the content labelled below as `Readme Content` in this file. |
32 | | -- Use the "generate-autorest" mcp tool to generate the <serviceName> module. |
| 41 | +- Use the "generate-autorest" mcp tool to generate the <PowerShell module name> module. |
33 | 42 | - Stage 2 Complete. |
34 | 43 |
|
35 | 44 | ## Stage 3: Updating Example Files |
@@ -77,8 +86,8 @@ input-file: |
77 | 86 |
|
78 | 87 | module-version: 0.1.0 |
79 | 88 |
|
80 | | -title: <serviceName> |
81 | | -service-name: <serviceName> |
| 89 | +title: <PowerShell module name> |
| 90 | +service-name: <PowerShell module name> |
82 | 91 | subject-prefix: $(service-name) |
83 | 92 |
|
84 | 93 | directive: |
|
0 commit comments