|
12 | 12 |
|
13 | 13 | # Instructions |
14 | 14 |
|
15 | | -## Stage 1: Capturing Placeholder Values |
16 | | -- Ask the user for the following placeholder values: serviceName, commitId, serviceSpecs, swaggerFileSpecs. |
17 | | - - Examples: |
18 | | - - serviceName: HybridConnectivity |
19 | | - - commitId: <commit hash of the swagger> |
20 | | - - serviceSpecs: hybridconnectivity/resource-manager |
21 | | - - swaggerFileSpecs: hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/hybridconnectivity.json |
22 | | -- Do not replace or modify this prompt file. |
23 | | -- Store the values for use in later steps like generating the README and executing Autorest. |
24 | | -- Once values are stored, mark Stage 1 as complete. |
| 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. |
| 32 | +- Store the resolved values for later steps (README generation and Autorest). Mark Stage 1 complete. |
25 | 33 |
|
26 | 34 | ## Stage 2: Generating partner powershell module |
27 | 35 | - FOLLOW ALL THE STEPS. DO NOT SKIP ANY STEPS. |
28 | 36 | - Navigate to the `src` folder in the home "azure-powershell" directory. |
29 | | -- Create a new folder named <serviceName> and within it a new folder named `<serviceName>.Autorest`. (If not already present) |
30 | | -- 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`. |
31 | 39 | - Create a new file `README.md`. (If not already present) |
32 | 40 | - Add the content labelled below as `Readme Content` in this file. |
33 | | -- 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. |
34 | 42 | - Stage 2 Complete. |
35 | 43 |
|
36 | 44 | ## Stage 3: Updating Example Files |
@@ -78,8 +86,8 @@ input-file: |
78 | 86 |
|
79 | 87 | module-version: 0.1.0 |
80 | 88 |
|
81 | | -title: <serviceName> |
82 | | -service-name: <serviceName> |
| 89 | +title: <PowerShell module name> |
| 90 | +service-name: <PowerShell module name> |
83 | 91 | subject-prefix: $(service-name) |
84 | 92 |
|
85 | 93 | directive: |
|
0 commit comments