Skip to content

Commit dec3d49

Browse files
author
Yulin Li
committed
Merge branch 'rhurey/vl_specs' of https://github.com/rhurey/azure-rest-api-specs into yulin/formats-typo
2 parents 9b4d7f8 + 3980a5c commit dec3d49

18,440 files changed

Lines changed: 1817533 additions & 1280148 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@
9595
/specification/containerservice/ @palma21 @weinong @seguler @alvinli222 @justindavies @matthchr @robbiezhang @paulgmiller @yizhang4321 @circy9 @qike-ms
9696

9797
# PRLabel: %Container Service Fleet
98-
/specification/containerservice/**/fleet/ @circy9 @serbrech @jim-minter @matthchr
99-
100-
# PRLabel: %Container Service Fleet
101-
/specification/containerservice/Fleet.Management/ @circy9 @serbrech @jim-minter @matthchr
98+
/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/ @circy9 @serbrech @matthchr
10299

103100
# PRLabel: %Cosmos
104101
/specification/cosmos-db/ @pjohari-ms @MehaKaushik
@@ -311,4 +308,5 @@
311308
/.github/copilot-instructions.md @praveenkuttappan @maririos
312309
/.github/prompts/ @praveenkuttappan @maririos
313310
/.github/instructions/ @praveenkuttappan @maririos
311+
/.github/instructions/*arm*.md @raosuhas
314312
/.github/chatmodes/ @praveenkuttappan @maririos
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Install dependencies for github-script actions
2+
description: Installs dependencies for github-script actions
3+
4+
runs:
5+
using: composite
6+
7+
steps:
8+
- uses: ./.github/actions/setup-node-install-deps
9+
with:
10+
# actions/github-script@v8 uses Node 24
11+
node-version: 24.x
12+
# "--no-audit": improves performance
13+
# "--omit dev": not needed at runtime, improves performance
14+
install-command: "npm ci --no-audit --omit dev"
15+
working-directory: ./.github

.github/actions/setup-node-install-deps/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Uses specified Node version and installs dependencies (typically us
44
inputs:
55
node-version:
66
description: "Node version to use"
7-
default: 22.x
7+
default: 24.x
88
install-command:
99
description: "Command to install dependencies"
1010
default: "npm ci"

.github/copilot-instructions.md

Lines changed: 14 additions & 376 deletions
Large diffs are not rendered by default.

.github/dependabot.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
version: 2
22
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
37
- package-ecosystem: "npm"
48
directories:
59
- "/"
@@ -20,18 +24,17 @@ updates:
2024
ignore:
2125
# Updated manually to align with minimum supported Node version
2226
- dependency-name: "@types/node"
23-
# Updated manually to align with repo microsoft/typespec
24-
- dependency-name: "@vitest/coverage-v8"
25-
- dependency-name: "prettier"
26-
- dependency-name: "vitest"
27-
- dependency-name: "typescript"
2827
# Updated manually by the Liftr team
2928
- dependency-name: "@azure-tools/typespec-liftr-base"
3029
# Only allow patch updates for spec-gen-sdk
3130
- dependency-name: "@azure-tools/spec-gen-sdk"
3231
update-types: ["version-update:semver-minor", "version-update:semver-major"]
3332
groups:
3433
# Ships separately from other typespec packages
34+
openapi-typespec:
35+
patterns:
36+
- "@azure-tools/openai-typespec"
37+
# Ships separately from other typespec packages
3538
typespec-client-generator-cli:
3639
patterns:
3740
- "@azure-tools/typespec-client-generator-cli"
@@ -57,11 +60,6 @@ updates:
5760
ignore:
5861
# Updated manually to align with minimum supported Node version
5962
- dependency-name: "@types/node"
60-
# Updated manually to align with repo microsoft/typespec
61-
- dependency-name: "@vitest/coverage-v8"
62-
- dependency-name: "prettier"
63-
- dependency-name: "vitest"
64-
- dependency-name: "typescript"
6563
# Points to "github:actions/github-script" since package isn't published to npmjs
6664
- dependency-name: "@types/github-script"
6765
groups:

.github/eslint.config.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
import { defineConfig } from "eslint/config";
12
import { defineBaseConfig } from "./shared/eslint.base.config.js";
23

3-
export default defineBaseConfig({
4-
// ensures the tsconfig path resolves relative to this file (so cannot be defined in base file)
5-
// default is process.cwd() when running eslint, which may be incorrect
6-
tsconfigRootDir: import.meta.dirname,
7-
});
4+
export default defineConfig(
5+
defineBaseConfig({
6+
// ensures the tsconfig path resolves relative to this file (so cannot be defined in base file)
7+
// default is process.cwd() when running eslint, which may be incorrect
8+
tsconfigRootDir: import.meta.dirname,
9+
}),
10+
{
11+
ignores: [
12+
// generated by `vitest --coverage`
13+
"shared/coverage/**",
14+
],
15+
},
16+
);
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
applyTo: "**/specification/**/resource-manager/*.json"
3+
---
4+
5+
# ARM OpenAPI (Swagger) Review Instructions
6+
7+
When reviewing Azure Resource Manager (ARM) OpenAPI specifications, ensure compliance with Microsoft API
8+
Guidelines and Azure RPC contracts. Prioritize Azure RPC requirements when conflicts arise.
9+
10+
## Critical Requirements
11+
12+
### 1. API Guidelines Compliance
13+
14+
- **MUST** follow [Azure REST API Guidelines]
15+
(https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md)
16+
- **MUST** conform to [Azure RPC contracts]
17+
(https://github.com/cloud-and-ai-microsoft/resource-provider-contract)
18+
- Azure RPC takes precedence over general guidelines in case of conflicts
19+
20+
### 2. Breaking Changes Prevention
21+
22+
- **NO breaking changes** in GA (stable) API versions per
23+
[Azure Breaking Changes Policy](https://aka.ms/AzBreakingChangesPolicy)
24+
- Verify no removal/renaming of properties, operations, or parameters in existing versions
25+
- Check property types remain unchanged (e.g., boolean → string is breaking)
26+
- Ensure enum values are not removed or renamed
27+
- New required properties or parameters require new API version
28+
- URL path format changes require new API version
29+
30+
### 3. ARM Resource Model Requirements
31+
32+
- Resource model name **MUST** match singular form of resource type (e.g., `VirtualMachine` for `virtualMachines`)
33+
- Top-level resources **MUST** have `ListByResourceGroup` and `ListBySubscription` operations
34+
- Tracked resources **MUST** have GET, PUT, PATCH (update), and DELETE operations
35+
- All resources **MUST** include `systemData` property (read-only) with type from common-types
36+
- Nested resources **MUST** have List operation
37+
38+
### 4. Common Types Usage
39+
40+
- **MUST** reference appropriate common-types version (v3, v4, or v5) for standard ARM types:
41+
- `Resource`, `TrackedResource`, `ProxyResource`, `ExtensionResource`
42+
- `ErrorResponse`, `ErrorDetail`
43+
- Standard parameters: `SubscriptionIdParameter`, `ResourceGroupNameParameter`, `ApiVersionParameter`
44+
- Use `$ref` to common-types instead of redefining standard ARM structures
45+
46+
### 5. API Versioning
47+
48+
- API version **MUST** follow `YYYY-MM-DD` format
49+
- Version **MUST** be in path:
50+
`/subscriptions/{subscriptionId}/providers/Microsoft.{Namespace}/...?api-version=YYYY-MM-DD`
51+
- Stable versions in `/stable/` directory, preview in `/preview/`
52+
53+
### 6. Security & Authentication
54+
55+
- **MUST** define `securityDefinitions` with OAuth2 Azure AD authentication
56+
- **MUST** apply `security` requirement to all operations
57+
- Scopes should use `user_impersonation` for management plane
58+
59+
### 7. Property & Parameter Correctness
60+
61+
- Mark required parameters as `"required": true` - incorrect marking breaks customers
62+
- Mark read-only properties as `"readOnly": true` (e.g., `id`, `name`, `type`, `systemData`)
63+
- Use `x-ms-mutability` to specify create/read/update behavior
64+
- Collections **MUST** support multiple elements, not artificially limited to one
65+
- Only define operations/properties/parameters actually supported by the service
66+
67+
### 8. Naming Conventions
68+
69+
- Properties and parameters: **camelCase** (e.g., `resourceGroupName`)
70+
- Resource types in path: **camelCase** (e.g., `/virtualMachines/{virtualMachineName}`)
71+
- Resource provider namespace: **PascalCase** (e.g., `Microsoft.Compute`)
72+
- Model definitions: **PascalCase** (e.g., `VirtualMachine`)
73+
- Enum values: **PascalCase** preferred
74+
- Avoid abbreviations in names unless industry-standard
75+
- Use resource name, not abbreviations, in path parameters: `{virtualMachineName}` not `{vmName}`
76+
77+
### 9. Operations & Operation IDs
78+
79+
- OperationId format: `{ResourceType}_{Action}` (e.g., `VirtualMachines_Get`, `VirtualMachines_CreateOrUpdate`)
80+
- Operations **MUST** have unique `operationId`
81+
- Use standard verbs: GET → `Get/List`, PUT → `CreateOrUpdate`, PATCH → `Update`, DELETE → `Delete`, POST → action name
82+
- Include `x-ms-examples` referencing example JSON files
83+
- DELETE operations: return 200 (with body), 202 (async), or 204 (no content)
84+
- Long-running operations: use `x-ms-long-running-operation: true` and return 201 or 202
85+
86+
### 10. Pagination & Collections
87+
88+
- List operations **MUST** use `x-ms-pageable` with `nextLinkName`
89+
- Collection models **MUST** have `value` array property and optional `nextLink` string
90+
91+
### 11. Documentation Quality
92+
93+
- Every operation, parameter, property, and model **MUST** have clear description
94+
- Start operation descriptions with verb (e.g., "Gets the virtual machine.")
95+
- Start with capital letter, end with period
96+
- Specify units for quantifiable properties (MB, seconds, etc.)
97+
- Use correct acronym capitalization: "URL" not "Url", "ID" not "Id"
98+
- Avoid: "Gets or sets...", "Gets...", "Sets..." in property descriptions
99+
- Document all HTTP status codes in responses
100+
101+
### 12. Error Handling
102+
103+
- Default error response **MUST** reference common-types `ErrorResponse`
104+
- Include "default" response for all operations
105+
- Use `x-ms-error-response: true` for error responses
106+
107+
### 13. Extensions & Special Features
108+
109+
- **REQUIRED**: `x-ms-parameter-location: "method"` for common parameters
110+
(subscriptionId, resourceGroupName, apiVersion)
111+
- Use `x-ms-enum` with `modelAsString: true` for extensible enums (allows new values without breaking)
112+
- Use `x-ms-discriminator-value` for polymorphic types
113+
- Private/internal operations: mark with `x-ms-visibility: "internal"`
114+
115+
### 14. Customer Usability
116+
117+
Think as a customer: Are parameter names intuitive? Is required vs. optional clear? Are default values
118+
documented? Can developers understand how to use this API from the specification alone?
119+
120+
### 15. Examples & Testing
121+
122+
- **MUST** include `x-ms-examples` for all operations
123+
- Example files in `examples/` directory
124+
- **MUST** test all operations before PR submission
125+
- Examples **MUST** validate against specification
126+
127+
## Review Checklist Summary
128+
129+
✓ No breaking changes in existing versions
130+
✓ Follows Azure RPC contracts
131+
✓ Common-types properly referenced
132+
✓ Naming conventions (camelCase properties, PascalCase types)
133+
✓ Required/readOnly correctly marked
134+
✓ Security definitions present
135+
✓ Standard ARM operations implemented
136+
✓ Pagination on list operations
137+
✓ Operation IDs follow pattern
138+
✓ Examples provided and valid
139+
✓ Descriptions clear and complete
140+
✓ API version format correct
141+
142+
Flag violations clearly with line numbers and specific guidance for fixes.
143+
Once completed always add the following comment : "Copilot used the entire file : .github/instructions/armapi-review.instructions.md for arm api reviews."
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Run SDK generation using pipeline in GitHub coding agent
2+
3+
Run only SDK generation using pipeline and do not run SDK generation using local SDK generation tools. This is applicable only when GitHub copilot coding agent is used to generate SDK and if a Release Plan is available in the context. Run SDK generation tool even if release plan already has SDK generation pipeline URL to support regenerating SDK. Coding agent must wait until all SDK generation pipeline are in completed status and then fetch the SDK details from pipeline run. This is applicable only when a GitHub issue is assigned to GitHub coding agent to generate SDK from a TypeSpec project. This is not applicable when running Copilot from Visual Studio and VS Code.
4+
5+
## Additional instructions:
6+
7+
- Run SDK generation pipeline for the given TypeSpec path for all languages mentioned in the description.
8+
- Identify absolute path of TypeSpec project root path and send it to Run SDK generation MCP tool call.
9+
- Keep checking the pipeline status every 10 minutes until pipeline is in completed or failed status.
10+
- Find SDK pull request links from the pipeline run.
11+
- Do not mark as language as excluded in the release plan just because SDK generation pipeline failed for that language. Inform user about the failure and suggest to check pipeline logs for more information.
12+
- Do not run verify setup, TypeSpec validation, service label check and analyze pipeline tools when running SDK generation using GitHub coding agent.
13+
14+
## Constraints:
15+
16+
- Do not invoke other steps.
17+
- Do not modify main.tsp file or any files in TypeSpec project.
18+
- Do not add API version to an existing main.tsp if input API version is not present.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Use this guidance whenever someone needs to add language emitters to an existing `tspconfig.yaml`, or when SDK generation fails because an emitter block is missing.
2+
3+
- Decide whether the service is ARM or data-plane.
4+
- Open the matching widget `tspconfig.yaml` template.
5+
- Copy the entire emitter block for the requested language.
6+
- Replace every `Widget`/`widget` token with the service name and drop the block under `options:`.
7+
8+
## 1. Identify the service type
9+
10+
- Path contains `/resource-manager/` or linter references `@azure-tools/typespec-azure-rulesets/resource-manager` → ARM
11+
- Path contains `/data-plane/` or linter references `@azure-tools/typespec-azure-rulesets/data-plane` → Data plane
12+
13+
## 2. Reference the official widget template
14+
15+
- ARM: `specification/widget/resource-manager/Microsoft.Widget/Widget/tspconfig.yaml`
16+
- Data plane: `specification/widget/data-plane/WidgetAnalytics/tspconfig.yaml`
17+
18+
Always read the template before editing so you follow the canonical configuration.
19+
20+
## 3. Copy and customize the emitter block
21+
22+
- Select the entire block for the language.
23+
- Only replace service-specific tokens (`Widget`, `widget`, namespaces, package names) with your service name.
24+
- Leave the rest of the properties (`flavor`, boolean flags, `{service-dir}` placeholders, etc.) unchanged.
25+
26+
## 4. Insert into the project config
27+
28+
- Paste the customized block under `options:` in the target `tspconfig.yaml`, keeping YAML indentation intact.
29+
- Confirm the `parameters:` section defines `"service-dir"` (for example `sdk/<servicename>`); add it if missing.
30+
31+
**Quick checks**
32+
33+
- Do not mix ARM and data-plane templates.
34+
- Do not cherry-pick individual properties—copy the whole block or errors will persist.
35+
- If the SDK pipeline still reports missing configuration, re-open the template and verify every `Widget` reference was replaced.

0 commit comments

Comments
 (0)