Skip to content

Commit 8ce45e9

Browse files
committed
update applicationgateway tags
1 parent 7265ba5 commit 8ce45e9

10 files changed

Lines changed: 145 additions & 92 deletions

File tree

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
name: azure-typespec-author
3+
description: "Use this skill when authoring or modifying Azure TypeSpec API specifications in the azure-rest-api-specs repository. Triggers for any TypeSpec related tasks, including: adding new API versions (preview or stable), creating or modifying ARM resources or data-plane services, defining models/enums/unions, adding operations to resources or interfaces, updating TypeSpec definitions for Azure services, or fixing TypeSpec compilation errors. Keywords: TypeSpec, tsp, ARM, resource-manager, data-plane, API version, preview version, stable version, Azure resource, Azure service, resource provider."
4+
---
5+
6+
# Azure TypeSpec Author
7+
8+
## Operating Principles (non-negotiable)
9+
10+
1. **Do not edit any files until you have required inputs and have retrieved solution** Use the `azure-sdk-mcp/azsdk_typespec_generate_authoring_plan` tool.
11+
2. Make **minimal, scoped edits** to satisfy the request. Avoid refactors unless explicitly asked.
12+
3. After edits, **validate** (compile / lint / emitter checks if available) and report results.
13+
4. Always provide **references** (titles/sections/links) from retrieved context that justify the recommended approach.
14+
15+
## Required Inputs Checklist (ask if missing)
16+
Before planning edits, ensure you have:
17+
- **Spec root / folder** (where the TypeSpec project lives)
18+
- **Service Type**: management-plane vs data-plane
19+
- **Existing API versions**
20+
- **Target API version(s)** (existing or new; preview/stable)
21+
- **Intent**: add/modify/fix (resource, operation, model, decorator, versioning, etc.)
22+
- **Target resource/interface/operation names** (if known)
23+
- **Constraints**: breaking-change limits, naming/versioning rules, emitter targets, etc.
24+
25+
If any of the above is missing, ask **up to 6 concise questions** and stop.
26+
27+
## Workflow
28+
29+
When encountering a TypeSpec authoring cases, follow this workflow (must follow exactly):
30+
31+
### Step 1 — Intake & Clarification (no file edits)
32+
- Read the user request.
33+
- Extract any provided values for the Required Inputs Checklist.
34+
- If missing, ask concise questions and wait for the user reply. ask the questions one by one, with each question confirming a specific piece of information.
35+
36+
### Step 2 — Retrieve Solution
37+
38+
Call the `azure-sdk-mcp/azsdk_typespec_generate_authoring_plan` tool:
39+
40+
- Provide the best available arguments derived from the intake:
41+
- Service Type
42+
- apiVersion / versions
43+
- intent
44+
- resource/interface/operation names
45+
- key constraints / keywords
46+
- Use user request (verbatim) as parameter `request`
47+
- Read the relative code (.tsp) for this request, and put it as `additionalInformation` parameter
48+
- use typespec project root path as `typeSpecProjectRootPath` parameter
49+
50+
### Step 3 — Apply Changes (edits)
51+
52+
Only after a grounded plan is produced:
53+
54+
- Make the minimal changes required in the relevant `.tsp` files
55+
- Prefer following the official template/pattern from RETRIEVED_CONTEXT even if the repo has older patterns
56+
57+
### Step 4 — Validate
58+
59+
- Run `azure-sdk-mcp/azsdk_run_typespec_validation` tool to run validation
60+
- If validation fails, fix forward with minimal changes
61+
62+
### Step 5 — Summarize
63+
64+
Return:
65+
66+
- Files changed (list)
67+
- What changed and why (brief)
68+
- Validation results (pass/fail + key output)
69+
- References from RETRIEVED_CONTEXT used to justify important decisions
70+
71+
---

.vscode/mcp.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
{
1+
{
22
"servers": {
33
"azure-sdk-mcp": {
44
"type": "stdio",
5-
"command": "pwsh",
6-
"args": ["${workspaceFolder}/eng/common/mcp/azure-sdk-mcp.ps1", "-Run"]
5+
"command": "C:\\Users\\v-zihewang\\Downloads\\azsdk",
6+
"args": ["start"],
7+
78
},
89
}
9-
}
10+
}

specification/network/resource-manager/Microsoft.Network/Network/ApplicationGateway.tsp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,18 @@ model ApplicationGateway extends Resource {
4747

4848
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
4949
@Azure.ResourceManager.Legacy.feature(Features.applicationGateway)
50-
@armResourceOperations
50+
@armResourceOperations(#{omitTags: true})
5151
interface ApplicationGateways {
5252
/**
5353
* Gets the specified application gateway.
5454
*/
55+
@tag("ApplicationGateways")
5556
get is ArmResourceRead<ApplicationGateway, Error = CloudError>;
5657

5758
/**
5859
* Creates or updates the specified application gateway.
5960
*/
61+
@tag("ApplicationGateways")
6062
createOrUpdate is ArmResourceCreateOrReplaceAsync<
6163
ApplicationGateway,
6264
Error = CloudError
@@ -65,6 +67,7 @@ interface ApplicationGateways {
6567
/**
6668
* Updates the specified application gateway tags.
6769
*/
70+
@tag("ApplicationGateways")
6871
@patch(#{ implicitOptionality: false })
6972
updateTags is ArmCustomPatchSync<
7073
ApplicationGateway,
@@ -76,6 +79,7 @@ interface ApplicationGateways {
7679
* Deletes the specified application gateway.
7780
*/
7881
#suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
82+
@tag("ApplicationGateways")
7983
delete is ArmResourceDeleteWithoutOkAsync<
8084
ApplicationGateway,
8185
Response = ArmDeletedResponse | ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse,
@@ -85,16 +89,19 @@ interface ApplicationGateways {
8589
/**
8690
* Lists all application gateways in a resource group.
8791
*/
92+
@tag("ApplicationGateways")
8893
list is ArmResourceListByParent<ApplicationGateway, Error = CloudError>;
8994

9095
/**
9196
* Gets all the application gateways in a subscription.
9297
*/
98+
@tag("ApplicationGateways")
9399
listAll is ArmListBySubscription<ApplicationGateway, Error = CloudError>;
94100

95101
/**
96102
* Starts the specified application gateway.
97103
*/
104+
@tag("ApplicationGateways")
98105
start is ArmResourceActionAsync<
99106
ApplicationGateway,
100107
void,
@@ -107,6 +114,7 @@ interface ApplicationGateways {
107114
/**
108115
* Stops the specified application gateway in a resource group.
109116
*/
117+
@tag("ApplicationGateways")
110118
stop is ArmResourceActionAsync<
111119
ApplicationGateway,
112120
void,
@@ -119,6 +127,7 @@ interface ApplicationGateways {
119127
/**
120128
* Gets the backend health of the specified application gateway in a resource group.
121129
*/
130+
@tag("ApplicationGateways")
122131
@action("backendhealth")
123132
backendHealth is ArmResourceActionAsync<
124133
ApplicationGateway,
@@ -137,6 +146,7 @@ interface ApplicationGateways {
137146
/**
138147
* Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group.
139148
*/
149+
@tag("ApplicationGateways")
140150
@action("getBackendHealthOnDemand")
141151
backendHealthOnDemand is ArmResourceActionAsync<
142152
ApplicationGateway,
@@ -157,6 +167,7 @@ interface ApplicationGateways {
157167
*/
158168
#suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
159169
@operationId("ApplicationGatewayPrivateLinkResources_List")
170+
@tag("ApplicationGatewayPrivateLinkResources")
160171
@list
161172
@get
162173
@action("privateLinkResources")

specification/network/resource-manager/Microsoft.Network/Network/ApplicationGatewayAvailableSslOptions.tsp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ alias ApplicationGatewayAvailableSslOptionsOps = Azure.ResourceManager.Legacy.Ro
5151

5252
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
5353
@Azure.ResourceManager.Legacy.feature(Features.applicationGateway)
54-
@armResourceOperations(#{ allowStaticRoutes: true })
54+
@armResourceOperations(#{ allowStaticRoutes: true, omitTags: true })
5555
interface ApplicationGatewayAvailableSslOptionsOperationGroup {
5656
/**
5757
* Lists available Ssl options for configuring Ssl policy.
5858
*/
5959
#suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
60+
@tag("ApplicationGateways")
6061
@operationId("ApplicationGateways_ListAvailableSslOptions")
6162
@autoRoute
6263
listAvailableSslOptions is ArmResourceRead<
@@ -69,6 +70,7 @@ interface ApplicationGatewayAvailableSslOptionsOperationGroup {
6970
* Lists all SSL predefined policies for configuring Ssl policy.
7071
*/
7172
#suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
73+
@tag("ApplicationGateways")
7274
@operationId("ApplicationGateways_ListAvailableSslPredefinedPolicies")
7375
@list
7476
@get
@@ -86,6 +88,7 @@ interface ApplicationGatewayAvailableSslOptionsOperationGroup {
8688
* Gets Ssl predefined policy with the specified policy name.
8789
*/
8890
#suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
91+
@tag("ApplicationGateways")
8992
@operationId("ApplicationGateways_GetSslPredefinedPolicy")
9093
@get
9194
@route("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}")

specification/network/resource-manager/Microsoft.Network/Network/ApplicationGatewayWafDynamicManifestResult.tsp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,13 @@ alias ApplicationGatewayWafDynamicManifestResultOps = Azure.ResourceManager.Lega
6161

6262
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
6363
@Azure.ResourceManager.Legacy.feature(Features.applicationGateway)
64-
@armResourceOperations
64+
@armResourceOperations(#{omitTags: true})
6565
interface ApplicationGatewayWafDynamicManifestResults {
6666
/**
6767
* Gets the regional application gateway waf manifest.
6868
*/
6969
#suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
70+
@tag("ApplicationGateways")
7071
@operationId("ApplicationGatewayWafDynamicManifestsDefault_Get")
7172
get is ApplicationGatewayWafDynamicManifestResultOps.Read<
7273
ApplicationGatewayWafDynamicManifestResult,
@@ -77,6 +78,7 @@ interface ApplicationGatewayWafDynamicManifestResults {
7778
* Gets the regional application gateway waf manifest.
7879
*/
7980
#suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
81+
@tag("ApplicationGateways")
8082
@operationId("ApplicationGatewayWafDynamicManifests_Get")
8183
applicationGatewayWafDynamicManifestsGet is ArmResourceListByParent<
8284
ApplicationGatewayWafDynamicManifestResult,

specification/network/resource-manager/Microsoft.Network/Network/diff-output/ApplicationGateway/API_CHANGES.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44

55
| Path | Change Type | Value |
66
|------|------------|-------|
7-
| `paths['/subscriptions/{subscriptionId}/providers/microsoft.Network/applicationGatewayAvailableRequestHeaders'].get.tags__deleted` | deleted | `["ApplicationGateways"]` |
8-
| `paths['/subscriptions/{subscriptionId}/providers/microsoft.Network/applicationGatewayAvailableResponseHeaders'].get.tags__deleted` | deleted | `["ApplicationGateways"]` |
9-
| `paths['/subscriptions/{subscriptionId}/providers/microsoft.Network/applicationGatewayAvailableServerVariables'].get.tags__deleted` | deleted | `["ApplicationGateways"]` |
10-
| `paths['/subscriptions/{subscriptionId}/providers/microsoft.Network/applicationGatewayAvailableWafRuleSets'].get.tags__deleted` | deleted | `["ApplicationGateways"]` |
11-
| `paths['/subscriptions/{subscriptionId}/providers/microsoft.Network/locations/{location}/applicationGatewayWafDynamicManifests'].get.tags__added` | added | `["ApplicationGatewayWafDynamicManifestResults"]` |
12-
| `paths['/subscriptions/{subscriptionId}/providers/microsoft.Network/locations/{location}/applicationGatewayWafDynamicManifests/dafault'].get.tags__added` | added | `["ApplicationGatewayWafDynamicManifestResults"]` |
13-
| `tags__added` | added | `[{"name":"ApplicationGateways"},{"name":"ApplicationGatewayAvailableSslOptionsOperationGroup"},{"nam...` |
7+
| `paths['/subscriptions/{subscriptionId}/providers/microsoft.Network/locations/{location}/applicationGatewayWafDynamicManifests'].get.tags__added` | added | `["ApplicationGateways"]` |
8+
| `paths['/subscriptions/{subscriptionId}/providers/microsoft.Network/locations/{location}/applicationGatewayWafDynamicManifests/dafault'].get.tags__added` | added | `["ApplicationGateways"]` |
9+
| `tags__added` | added | `[{"name":"ApplicationGateways"},{"name":"ApplicationGatewayPrivateLinkResources"},{"name":"Applicati...` |
1410

1511
### Changes for `$ref`
1612

specification/network/resource-manager/Microsoft.Network/Network/diff-output/ApplicationGateway/diff.json

Lines changed: 3 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,18 @@
44
"name": "ApplicationGateways"
55
},
66
{
7-
"name": "ApplicationGatewayAvailableSslOptionsOperationGroup"
7+
"name": "ApplicationGatewayPrivateLinkResources"
88
},
99
{
1010
"name": "ApplicationGatewayPrivateEndpointConnections"
1111
},
12-
{
13-
"name": "ApplicationGatewayWafDynamicManifestResults"
14-
},
1512
{
1613
"name": "WebApplicationFirewallPolicies"
1714
}
1815
],
1916
"paths": {
2017
"/subscriptions/{subscriptionId}/providers/microsoft.Network/applicationGatewayAvailableRequestHeaders": {
2118
"get": {
22-
"tags__deleted": [
23-
"ApplicationGateways"
24-
],
2519
"responses": {
2620
"200": {
2721
"schema": {
@@ -45,9 +39,6 @@
4539
},
4640
"/subscriptions/{subscriptionId}/providers/microsoft.Network/applicationGatewayAvailableResponseHeaders": {
4741
"get": {
48-
"tags__deleted": [
49-
"ApplicationGateways"
50-
],
5142
"responses": {
5243
"200": {
5344
"schema": {
@@ -71,9 +62,6 @@
7162
},
7263
"/subscriptions/{subscriptionId}/providers/microsoft.Network/applicationGatewayAvailableServerVariables": {
7364
"get": {
74-
"tags__deleted": [
75-
"ApplicationGateways"
76-
],
7765
"responses": {
7866
"200": {
7967
"schema": {
@@ -97,16 +85,6 @@
9785
},
9886
"/subscriptions/{subscriptionId}/providers/microsoft.Network/applicationGatewayAvailableSslOptions/default": {
9987
"get": {
100-
"tags": [
101-
[
102-
"-",
103-
"ApplicationGateways"
104-
],
105-
[
106-
"+",
107-
"ApplicationGatewayAvailableSslOptionsOperationGroup"
108-
]
109-
],
11088
"responses": {
11189
"default": {
11290
"schema": {
@@ -121,16 +99,6 @@
12199
},
122100
"/subscriptions/{subscriptionId}/providers/microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies": {
123101
"get": {
124-
"tags": [
125-
[
126-
"-",
127-
"ApplicationGateways"
128-
],
129-
[
130-
"+",
131-
"ApplicationGatewayAvailableSslOptionsOperationGroup"
132-
]
133-
],
134102
"responses": {
135103
"default": {
136104
"schema": {
@@ -145,16 +113,6 @@
145113
},
146114
"/subscriptions/{subscriptionId}/providers/microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}": {
147115
"get": {
148-
"tags": [
149-
[
150-
"-",
151-
"ApplicationGateways"
152-
],
153-
[
154-
"+",
155-
"ApplicationGatewayAvailableSslOptionsOperationGroup"
156-
]
157-
],
158116
"responses": {
159117
"default": {
160118
"schema": {
@@ -169,9 +127,6 @@
169127
},
170128
"/subscriptions/{subscriptionId}/providers/microsoft.Network/applicationGatewayAvailableWafRuleSets": {
171129
"get": {
172-
"tags__deleted": [
173-
"ApplicationGateways"
174-
],
175130
"responses": {
176131
"default": {
177132
"schema": {
@@ -215,7 +170,7 @@
215170
"/subscriptions/{subscriptionId}/providers/microsoft.Network/locations/{location}/applicationGatewayWafDynamicManifests": {
216171
"get": {
217172
"tags__added": [
218-
"ApplicationGatewayWafDynamicManifestResults"
173+
"ApplicationGateways"
219174
],
220175
"responses": {
221176
"default": {
@@ -232,7 +187,7 @@
232187
"/subscriptions/{subscriptionId}/providers/microsoft.Network/locations/{location}/applicationGatewayWafDynamicManifests/dafault": {
233188
"get": {
234189
"tags__added": [
235-
"ApplicationGatewayWafDynamicManifestResults"
190+
"ApplicationGateways"
236191
],
237192
"responses": {
238193
"default": {
@@ -522,16 +477,6 @@
522477
},
523478
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Network/applicationGateways/{applicationGatewayName}/privateLinkResources": {
524479
"get": {
525-
"tags": [
526-
[
527-
"-",
528-
"ApplicationGatewayPrivateLinkResources"
529-
],
530-
[
531-
"+",
532-
"ApplicationGateways"
533-
]
534-
],
535480
"responses": {
536481
"default": {
537482
"schema": {

0 commit comments

Comments
 (0)